problems writing to database in 7.2

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
petersa2
Newbie
Posts: 9
Joined: Thu Mar 13, 2003 8:27 pm

problems writing to database in 7.2

Post by petersa2 » Thu May 22, 2003 4:26 pm

I am using VB to import data into an access 2000 database. When I recompiled the script with MS 7.2, my script no longer wrote to the database, but did not post any errors. I would love to take advantage of the new functions in 7.2, but cannot if I continue to have this problem. Does anyone know what might cause this? Is there a different command syntax in 7.2 that I am unaware of? Thanks for the help.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Thu May 22, 2003 9:27 pm

Can you please provide a clip of the script portion that is not running properly?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

petersa2
Newbie
Posts: 9
Joined: Thu Mar 13, 2003 8:27 pm

Post by petersa2 » Fri Jun 06, 2003 1:43 pm

Here is a sample:






VBSTART

Function export(sqlstr,field)
set cn = CreateObject("ADODB.Connection")
cn.open "Driver={Microsoft Access Driver
(*.mdb)};DBQ=\\server\database.mdb"
Set rs = cn.Execute("" & sqlstr & "")
export = rs.Fields("" & field & "")
cn.close
End Function

function import(sqlstr)
set cn = CreateObject("ADODB.Connection")
cn.open "Driver={Microsoft Access Driver
(*.mdb)};DBQ=\\server\database.mdb"
set rs = cn.Execute("" & sqlstr & "")
cn.Close
End function

VBEND




Input>a,Enter style:,Style
Input>b,Enter Service Tag:,XXXXXX
let>sqlstr=Insert into installs (style, asset) values ('%a%', '%b%')
VBeval>import("%sqlstr%")

let>sqlstr2=SELECT * FROM installs where asset = '%b%'
let>field=style
VBEval>export("%sqlstr2%","%field%"),output
MessageModal>The output Is : %output%

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts