How do I insert to sql server

  • Thread starter Thread starter adamscentral92
  • Start date Start date
A

adamscentral92

How do I insert a field into sql server in vb script. Can someone put
in an example?

Thanks,
AC92
 
Something along the lines of

Dim cn
Set cn = CreateObject("ADODB.Connection")
cn.Open "Provider=sqloledb;Data Source=Server;Initial
Catalog=YourDatabase;User Id=Login;Password=blaa;"
'or, trusted connection (NT authentication)
cn.Open "Provider=sqloledb;Data Source=Server;Initial
Catalog=YourDatabase;Integrated Security=SSPI;"

dim i

Set i = cn.Execute "ALTER table as per cor's link"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top