hi guys
I need assistance with SQL insert statement to
an access database. I want to insert values to a
particular table if the text box value is less than
0. below is the sample code.
dim value4 as integer
if integer.try parse(textbox4.text) then
if value4 <=0 then
dim cmd as new oledb.oledbcommand
SQL="insert into accountsReceivable" & _
"(receiptID,rdate,credit)"&_
"values"&_
"(:0,:1,:2)"
cmd.connection = newconn
cmd.transaction=mytransaction
cmd.commandtext=SQL
cmd.parameters.addwithvalue (":0",receiptID)
cmd.parameters. addwithvalue(":1",now.date)
cmd.parameters. addwithvalue(":2",credit)
cmd.executenonquerry()
cmd.dispose()
end if
end if
I have a similar procedure which I want to
insert to the database if the text box value is
greater than 0.
thanks.