Web Service Insert Into access database

hewstone999

New member
Joined
Feb 24, 2009
Messages
2
Programming Experience
Beginner
Hi there,

I want to create a Web Service that will insert values into a access database.

Probably be something like this but dont no the code enough to complete:


VB.NET:
msConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=R: C:\events.mdb"

****Insert code e.g. INSERT INTO eventstbl(User, pass) Values(name, password)***
Any help on this would be great, thanks
 
You will need to:

1) Open an ODBC connection with the connection string you posted
2) Create an ODBC command object
3) Set the ODBC command's command text to the SQL statement you want to execute
4) Execute the ODBC command object. Since this is an insert query, you can use the ExecuteNonQuery method of the command object
5) Close the connection, and dispose of the command object and the connection

I can provide more detail code if you want. Good luck!

John Tabernik
The Eclectic Techie
 

Latest posts

Back
Top