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

using vb to write SQL(SELECT INTO) query

Status
Not open for further replies.

smily

Programmer
Jul 24, 2002
1
US
I want to use the sql SELECT INTO query to select a particular row from my database then allocate only certain fields' data to variables.

dbs.execute "SELECT [NUM, TIME, DATE] into [num1, time1, date1] FROM TABLE1 Where NUM >5"

p.s.: dbs is a database

There is an error but I don't know where the error is...
can someone help me?

Thanks. :)
 
You shouldn't have the square brackets around the first block

dbs.execute "SELECT NUM, TIME, DATE into [num1, time1, date1] FROM TABLE1 Where NUM >5"


QED

G LS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top