Extract data from Access - ADO

Extract data from Access - ADO

Post by Nalaka Hendawitharan » Mon, 16 Jun 2003 13:19:44



Hi,

Can someone please tell me how I could get the data of built in query
from Access using ADO (with an example) ?

Thanks in advance

Regards,
Nalaka.

 
 
 

Extract data from Access - ADO

Post by Val Mazu » Tue, 17 Jun 2003 20:59:32


Hi,

In case if you are using Jet 4.0 OLEDB provider to connect to the database,
then you could call stored query exact same way as you could call stored
procedure

Dim loCommand as ADODB.Command
Dim loRecordset as ADODB.Recordset

Set loCommand = New ADODB.Command
Set loCommand.ActiveConnection=MyADOConnection

lcSQL="QueryNameHere"
loCommand.CommandText = lcSQL
loCommand.CommandType = adCmdStoredProc
Set loRecordset=loCommand.Execute
.....

--
Val Mazur
Microsoft MVP


Quote:> Hi,

> Can someone please tell me how I could get the data of built in query
> from Access using ADO (with an example) ?

> Thanks in advance

> Regards,
> Nalaka.


 
 
 

1. Extracting Excel Data via ADO 2.6 - can't get header info into recordset

Hi

I'm using ASP.NET extracting data from an excel spreadsheet.
been using ADO.NET but given up as i need the data to manipulated before it
goes into the sQL Server.

Have started to use ADO 2.6, created the record set and used the HDR=YES/NO
to keep or remove the header in the excel spreadsheet.

Either way i can get the first header (using Recordset.Value(0)). but the
next header at (REcordset(1)) gives a null value. (USed REcordset.MoveFirst
!)

(Need the header info so as to create recordset acceptable for table in
Database)

Anyone got any ideas, help desperately needed

Thanks
Scott

2. Recommandations for OLEDB providers

3. Excel VBA using ADO to extract data from SQL Server

4. Oracle 8 and Partition Views ?

5. How to extract the Caption property of MS Access columns using ADO/ADOX

6. Migrating Oracle 10,000 char field to SQL 6.5

7. extracting data from access into excel

8. Gif animated

9. Extracting Data from an access snapshot report

10. Extracting data from Access DB

11. Extracting dictionary data from MS Access databases

12. ODBC - extracting data from Access .MDB file

13. Extracting data from Access to spreadsheet.