Click to See Complete Forum and Search --> : Data not getting inserted into db


archana_a
June 16th, 2002, 10:13 PM
Hi all,

I am trying to insert rows into the database using ASP.net. I am not getting any errors however data isnt getting inserted either.

Is there a way to trap what the problem is, trap the contents of the dataset in question?

V. Lorenzo
June 17th, 2002, 03:46 AM
Hi:

Are you calling DataAdapter.Update(....etc.) after inserting your data into the DataSet ?

VictorL

archana_a
June 17th, 2002, 11:32 AM
No I havet done that. I have only written the insert Sql

insertCmd = "insert into CustomerWeb values ( @name, " +
"@address1, @city, @state, @zip)";
' Initialize the SqlCommand with the new SQL string.
myCommand = New SqlCommand(insertCmd, myConnection)

Also I really dont know which book I can use. I dont know any of this syntax I am completely new.

Archana

V. Lorenzo
June 18th, 2002, 04:01 AM
Hi:

Ok, let's do something about that. There are a couple of good books on the subject that could help you a lot:

For the basic concepts about C# programming:

- "C# and the .Net platform", Andrew Troelsen. It's based on the Beta 2 but it's fine.

For the basic concepts about ADO.NET programming:

- "A programmer's guide to ADO.NET in C#", Mahesh Chand.

In Internet you will find a lot os usefull material. Take a look at this sites:

- http://www.csharphelp.com/ Make an articles search with the keyword ADO.

- http://www.gotdotnet.com/ Has a quick start tutorials page, good stuff.

- http://www.15seconds.com/ some times usefull too.

Those are a good starting point, but there is a huge amount of sites out there.

Hope you luck.

VictorL