-----------------------------------------------------------
New Message on MumbaiUserGroup
-----------------------------------------------------------
From: Babunu3
Message 23 in Discussion
Dear Ajay Sir,
Thank you.
Following are underlined errors.
Dim insertcmd As String
insertcmd = "insert into BUY
values(@comp,@user,@script,@Bid_pr,@Bid_qt,@Brk,@TTL_Brk,@cos,@Date)"
Following lines (in capital letters) are showing error message of
invalid members of VB.net.
DIM CMD AS OLEDBCOMMAND = NEW OLEDBCOMMAND(INSERTCMD, CON)
CMD.PARAMETERS.ADD(NEW OLEDBPARAMETER("@COMP", OLEDBTYPE.TEXT))
CMD.PARAMETERS("@COMP").VALUE = TEXTBOX1.TEXT
CMD.PARAMETERS.ADD(NEW OLEDBPARAMETER("@USER", OLEDBTYPE.TEXT))
CMD.PARAMETERS("@USER").VALUE = TEXTBOX2.TEXT
CMD.PARAMETERS.ADD(NEW OLEDBPARAMETER("@SCRIPT", OLEDBTYPE.TEXT))
CMD.PARAMETERS("@SCRIPT").VALUE = TEXTBOX3.TEXT
CMD.PARAMETERS.ADD(NEW OLEDBPARAMETER("@BID_PR", OLEDBTYPE.MONEY))
CMD.PARAMETERS("@BID_PR").VALUE = TEXTBOX4.TEXT
CMD.PARAMETERS.ADD(NEW OLEDBPARAMETER("@BID_QT", OLEDBTYPE.INT))
CMD.PARAMETERS("@BID_QT").VALUE = TEXTBOX5.TEXT
CMD.PARAMETERS.ADD(NEW OLEDBPARAMETER("@BRK", OLEDBTYPE.MONEY))
CMD.PARAMETERS("@BRK").VALUE() = TEXTBOX6.TEXT
CMD.PARAMETERS.ADD(NEW OLEDBPARAMETER("@TTL_BRK", OLEDBTYPE.MONEY))
CMD.PARAMETERS("@TTL_BRK").VALUE = TEXTBOX7.TEXT
CMD.PARAMETERS.ADD(NEW OLEDBPARAMETER("@COS", OLEDBTYPE.MONEY))
CMD.PARAMETERS("@COS").VALUE = TEXTBOX8.TEXT
CMD.PARAMETERS.ADD(NEW OLEDBPARAMETER("@DATE", OLEDBTYPE.DATETIME))
CMD.PARAMETERS("@DATE").VALUE = TEXTBOX9.TEXT
con.Open()
Try
cmd.ExecuteNonQuery()
MessageBox.Show("Record Added")
Catch ex As OleDbException
If ex.Number = 2627 Then
MessageBox.Show("Error: A record already exists with" & "the
same primarykey")
Else
MessageBox.Show("Error:couldnot add record, please " & "ensure
the fields are
correctly filled out") End If
End Try
cmd.Connection.Close()
bind()
End Sub
_________________________________________________________________
Screensavers unlimited! http://www.msn.co.in/Download/screensaver/ Download
now!
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]