Before I show you one method of doing this I would have to ask why?
Using a DataPump is invariably quicker.
Here is your code.
dim db
dim cnString
set db = CREATEOBJECT("ADODB.Connection")
cnString = "Provider=SQLOLEDB;Data Source=MySQLServer;Integrated
Security=SSPI;Initial Catalog=Pubs"
db.Open cnString
db.Execute "INSERT titleauthor VALUES('998-72-3567','PC8888',1,10)"
db.close
set db = nothing
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"Spud_Monkey" <spudmonkey (AT) aol (DOT) co> wrote
Quote:
Hi
Could anyone please show me some sample code on how to insert a record
into
a table via vbscript in an activex module.
Cheers |