hi i m working on Student Database Management system, I have used button s for insertion, deletion, and update. Insert and delete button is working but update's click gives syntax error: Pls help as soon as possible:
Try Dim com As New OleDbCommand com.Connection = con com.CommandText = "update BCA2 set Rollno= " & trollno.Text & ",Stu_Name='" & tname.Text & "', FORTRAN = " & tfor.Text & ", Data Structures = " & tds.Text & ", Oracle =" & toracle.Text & ", C++=" & tcpp.Text & ", Unix = " & tunix.Text & " , Lab1 = " & tlab1.Text & ", Lab2 = " & tlab2.Text & ") where Rollno = " & ComboBox1.Text com.ExecuteNonQuery() MsgBox("Record Updated") Call Md_Settings() Catch exp As Exception MsgBox(exp.ToString()) End Try
Edited by __avd: Added [code] tags. For easy readability, always wrap programming code within posts in [code] (code blocks).
Don't form a sql string, use parametrized query.
.. com.CommandText = "update BCA2 set [Rollno]= " & trollno.Text & ",[Stu_Name]='" & tname.Text & "', [FORTRAN]= " & tfor.Text & ", [Data Structures]= " & tds.Text & ", [Oracle]=" & toracle.Text & ", [C++]=" & tcpp.Text & ", [Unix] = " & tunix.Text & " , [Lab1] = " & tlab1.Text & ", [Lab2] = " & tlab2.Text & " where [Rollno] = " & ComboBox1.Text ..
thank you............ hehehehe you don't know how happy i am. :) :) :)... It works. Now My student management System is working flawlessly.
Thanks a tonn. :)
I am working creating a fully encapsulated, homogeneous singly linked data structure. The Listing class and SinglyLinkedList class that are part of the whole application compile fine, but the problem ...
I have this block of code where l run through a table and display matched results in a listbox.
It works fine, but my question is how do l enable ...
I have developed a DBMS and I want to store the credentials for server, and user name securely so that the users don't have to enter the password ...