You can use ADO in VBScript - something along the lines of:
Dim cnn, rst
set cnn = CreateObject("ADODB.Connection")
set rst = CreateObject("ADODB.Recordset")
cnn.ConnectionString="Provider=SQLOLEDB;Data Source=(local);Integrated
Security=SSPI;Initial Catalog=YourDB"
cnn.Open
set rst = cnn.Execute ("Your SQL statement")
<do whatever you need to do>
cnn.Close
set cnn = nothing
-Sue
On 20 Oct 2004 00:23:08 -0700, karenmiddleol (AT) yahoo (DOT) com (Karen
Middleton) wrote:
Quote:
I have several scenarios whereby within a ActiveX script VB task
script I want to open one of the SQL connections defined in the
package and read from a table in the connection and also I want to be
able to take a value and update into the SQL table.
Can you kindly share the VB script code to read and insert data into a
SQL table preferably if it can use the existing connection.
Thanks
Karen |