July 21, 2008 at 11:50 am
I currently have a Script in our Terminal Emulator which swipes data and sends it via script to an Access Database Table. I need to rewrite this script to send the data to our new SQL: Database, any suggestions. The follow is only the send part of the script the previous script is standard capture of data swiped from screen.
Old Script:
' VB Script for Calllog
' 11/01/01 by P.Trudell
' Database objects
Dim rst
Dim dao
Dim wks
Dim db
Set db = CreateObject("ADODB.CONNECTION")
db.Provider = "Microsoft.Jet.OLEDB.4.0"
db.Open "User id=;password=;data source=\\Server\database.mdb"
Set rst = CreateObject("ADODB.Recordset")
Set cmd = CreateObject("ADODB.Command")
cmd.ActiveConnection = db
rst.CursorType = 1
rst.LockType = 2
cmd.CommandText="INSERT INTO Callog (LO,SSN,Name,Phone,CType,Remarks) VALUES ('" & LO & "','"& MyArea & "','"& MyArea1 &"','"& MyArea2 &"','"& List &"','"& PRemarks &"')"
cmd.Execute
db.Close
Set db = Nothing
MsgBox "Transfer Complete. Thank You"
StopScript
This script has worked all these tear without error, and I would like to move up to SQL. Thanks.
Pete
July 21, 2008 at 6:04 pm
Change the provider and the connection string and the rest will probably work as is.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
July 22, 2008 at 6:12 am
Thank You.... What would the provider be, or where could I find that information. Thanks.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply