mrmotocross
Programmer
My problem is i am only getting the first character into the first field. So if a try to insert "12345" only "1" is put into the field. The field is called "Fixture".
here is my code:
Set InsComm = New ADODB.Command
Set InsConn = New ADODB.Connection
Text100 = Mid(CompareText, 1, 100)
InsSql = "INSERT INTO InventoryDescriptions ( Fixture, Price, Lamp, Ballast, Retrokit, LaborCost ) VALUES (Text100, 0, 0, 0, 0, 0);"
InsConn.Open NesConnString
Set InsComm.ActiveConnection = InsConn
InsComm.CommandText = InsSql
On Error GoTo TheError
InsComm.Execute InsSql, adCmdText
GoTo TheClose
TheError:
msg = "ERROR # " & Str(Err.Number) & "Was Generated by " _
& Err.Source & Chr(13) & Err.Description
MsgBox msg, , "Error", Err.HelpFile, Err.HelpContext
Exit Sub
TheClose:
InsConn.Close
End Sub
thanks, bob
here is my code:
Set InsComm = New ADODB.Command
Set InsConn = New ADODB.Connection
Text100 = Mid(CompareText, 1, 100)
InsSql = "INSERT INTO InventoryDescriptions ( Fixture, Price, Lamp, Ballast, Retrokit, LaborCost ) VALUES (Text100, 0, 0, 0, 0, 0);"
InsConn.Open NesConnString
Set InsComm.ActiveConnection = InsConn
InsComm.CommandText = InsSql
On Error GoTo TheError
InsComm.Execute InsSql, adCmdText
GoTo TheClose
TheError:
msg = "ERROR # " & Str(Err.Number) & "Was Generated by " _
& Err.Source & Chr(13) & Err.Description
MsgBox msg, , "Error", Err.HelpFile, Err.HelpContext
Exit Sub
TheClose:
InsConn.Close
End Sub
thanks, bob