0
Private Sub Form_Load()
Call dbConnect
Call DBRS
strstudinfo = "SELECT Members.StudentID, Members.LastName, Members.FirstName, Members.MI, Members.Sex, Members.Address, Members.Age, Members.Birthday, Members.[Time Returned], Members.[Date Returned] FROM Members"

[B]rsstudinfo.Open strstudinfo, dbcon, 3, 3[/B]
Call datafill
Call disabling
'strstudinfo = "INSERT INTO Members(StudentID,LastName, FirstName, MI,Age,Address,Birthday,Time Returned,Date Returned) VALUES (" & txtmemstudid.Text & ", '" & txtmemlname.Text & "', '" & txtmemfname.Text & "', " & txtmemmi.Text & ", " & txtmemage.Text & ", '" & txtmemadd.Text & "', " & txtmembday.Text & ", #" & txtmemtreg.Text & "#, #" & txtmemdreg.Text & "#)"


txtmemstudid.BackColor = &HE0E0E0
txtmemlname.BackColor = &HE0E0E0
txtmemfname.BackColor = &HE0E0E0
txtmemmi.BackColor = &HE0E0E0
txtmemadd.BackColor = &HE0E0E0
txtmemage.BackColor = &HE0E0E0
txtmembday.BackColor = &HE0E0E0
cmd_sex.BackColor = &HE0E0E0
txtmemtreg.BackColor = &HE0E0E0
txtmemdreg.BackColor = &HE0E0E0

End Sub

I am using a connection object from code and a DataEnvironment in a VB application
ttis is a code for my form load ..

"rsstudinfo.Open strstudinfo, dbcon, 3, 3" this is the highlighted error please help

Edited by Ezzaral: Added code tags. Please use them to format any code that you post.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by debasisdas
0

You need not open a recordset object to execute an insert statement.

try this

dbcon.begintrans
dbcon.execute strstudinfo
dbcon.committrans
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.