Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to select from a odbc database?

Status
Not open for further replies.

gbfell

Programmer
Dec 11, 2001
27
0
0
US
i need to run the following code in vb

insert INTO ACOMPARTMENT select DB2ADMIN.ACOMPARTMENT.* from DB2ADMIN.ACOMPARTMENT IN 'DEMO';

its obviously not working because the 'demo' is the name of the DB2 ODBC datasource, not the path per say. how can i do this?
 

I believe (could be wrong) that all you need to do is remove the "IN DEMO" from your query string

insert INTO ACOMPARTMENT select DB2ADMIN.ACOMPARTMENT.* from DB2ADMIN.ACOMPARTMENT IN 'DEMO'

insert INTO ACOMPARTMENT select DB2ADMIN.ACOMPARTMENT.* from DB2ADMIN.ACOMPARTMENT

It's just a guess (w/info given) but worth a try.
 
any other ideas? i want to insert into an access db, from an ODBC DB2 db.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top