T
Tom Vukovich
I have an existing VB6 program that i am porting to VB.NET. It is a real
time data collection program that stores the data in an access database. The
program uses stored procedures to insert or update the data. The code is
below.
var(0) = byID
var(1) = intIndex
var(2) = intMPI
var(3) = lngCount
var(4) = sinMC
var(5) = CSng(lngCount * sinMC)
var(6) = gMeter_Reply.byFlags
var(7) = 0.1
var(8) = Meter_Info(intMtrNumber).intDBMtrIndex(intChannelnum) + 1
var(9) = dtInterval_Date
var(10) = varArray(12)
Try
Dim intRecord As Integer
cmdMeterInsert.Execute(intRecord,
var,ADODB.CommandTypeEnum.adCmdStoredProc)
Catch ex as exception
Connection method is:
strgsDatabase = GetSetting(gstrAppName, "Settings", "Database", "")
strConnect = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source="
This routine always works the first time but fails with the following error
on subsequent attempts.
"Expected query name after EXECUTE."
I hope someone can tell me what i am missing.
Thanks
tv
time data collection program that stores the data in an access database. The
program uses stored procedures to insert or update the data. The code is
below.
var(0) = byID
var(1) = intIndex
var(2) = intMPI
var(3) = lngCount
var(4) = sinMC
var(5) = CSng(lngCount * sinMC)
var(6) = gMeter_Reply.byFlags
var(7) = 0.1
var(8) = Meter_Info(intMtrNumber).intDBMtrIndex(intChannelnum) + 1
var(9) = dtInterval_Date
var(10) = varArray(12)
Try
Dim intRecord As Integer
cmdMeterInsert.Execute(intRecord,
var,ADODB.CommandTypeEnum.adCmdStoredProc)
Catch ex as exception
Connection method is:
strgsDatabase = GetSetting(gstrAppName, "Settings", "Database", "")
strConnect = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source="
This routine always works the first time but fails with the following error
on subsequent attempts.
"Expected query name after EXECUTE."
I hope someone can tell me what i am missing.
Thanks
tv