Hello,
In .NET im using the backend as SQL Server. but when i write codings for all insert,update and delete in .NET and run the form, the error it shows like
"Oledb exception was unhandled by the user" and error in SQL query.
the codings are....follows..
imports system
imports system.data
imports system.data.sqlclient
imports dataset1.
And in Page_Load..
dim con as sqlconnection
dim cmd as sqlcommand
dim adp as sqladapter
dim data as dataset1
con.connectionstring="Provider=SQLOLEDB;initialcatalog=preethi;database=ACER;integrated security=true"
cmd.connection=con
cmd=new sqlcommand("select * from emp"),con
adp=new sqldataadapter(cmd)
adp.Fill(data)
'since i have only 3 fields
textbox1.text=data.tables(1).rows(0).item(0)
textbox2.text=data.tables(1).rows(0).item(1)
textbox3.text=data.tables(1).rows(0).item(2)
In Insert button-click event.....
' its bcoz the second textbox has numeric value and 1st and 3rd have only string values.
cmd = new sqlcommand("insert into emp values( ' " & textbox1.text & " ', " & textbox2.text & ", ' " & textbox3.text & " ')" , con
cmd.executeNonQuery()
Response.write(" One record inserted").
So these are the codings im using. for delete also the same typeim using. but im getting error, can anyone help me to solve this?