PDA

Click to See Complete Forum and Search --> : From VB to Access


Tom Hapeman
Feb 18th, 2000, 12:25 AM
I need to send inputed information from a VB application to an Access database. What is the best method??? Can anyone supply me with an example program/code????
Thanks

Bigley
Feb 18th, 2000, 12:42 AM
You need to set up a reference to ADO library 2.0 or 2.1 and then use a command object of the ADODB class to execute a SQL INSERT statement as follows -

Dim cmd as New ADODB.command
Dim sSql as string

sSql = "Insert into tblWhatever......" cmd.ActiveConnection = <Your connection string>
cmd.CommandType = adCmdUnknown
cmd.CommandText = sSql
cmd.Execute

Hope this helps

Elias
Feb 21st, 2000, 11:15 AM
SAMS SQL in 24 hours, or 21 days are the best I've seen for learning SQL. You will need to understand this to be able to manipulate your data the way you want. Also look for books on ADO.

-Elias