Bharathi Level: Scholar
 Registered: 11-04-2005 Posts: 31
|
Re: i cat insert data into the database
Hi,
Follow these steps:
1.Create and pen a dtaabase connection.
2.Create a database command that represents the SQL Insert statement to execute
3.Execute the command with the ExecuteNonQuery() method.
Dim conAuthors As OleDbConnection
Dim strInsert As string
Dim cmdInsert As OleDbCommand
conAuthors=New OleDbConnection("Provider=Microsoft.Jet,OLEDB.4.0; Data Source=c:\Authors.mdb")
strInsert="Insert INTO Authors(au_fname,au_lname) Values ('Bert','Kare')"
cmdInsert= New OleDbCommand(strInsert,conAuthors)
conAuthors.Open()
cmdInsert.ExecuteNonQuery()
conAuthors.close()
Try these steps. Write the error.
Try this Book
"Develop an Accounting Web Application using ASP.Net"
Good luck
Regards
bhar
|