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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code to use "SELECT * INTO" with ADO

Status
Not open for further replies.

ubub

Programmer
Aug 5, 2001
3
CA
I have always used DAO for this task but I need to use ADO here.

I wat to select files from one table and insert them into an empty table. I understand the DAO Execute method syntax doesn't work but dont know he ADO method.
 
first u must set a reference to ADO library in vb6.
then :

dim sql as string
dim rs as recordset

SQL = "select * into newtable from oldtable"

Set rs = New Recordset
rs.Execute SQL, ConnectString, adOpenForwardOnly, adLockReadOnly, adCmdText

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top