Inserting data into a database
Hi,
I am using the following code, can any one help me i am trying to solve this problem science 3 days.
Urgent need please......
string cmdstr="INSERT INTO tblRegisteredUsers (UserID,TPwd,UserFName,UserLName) VALUES('"+UserId.Text+"', "+ " '"+Pwd.Text+"','"+FirstName.Text+"','"+LastName.Text+"')";
The data is not inserting into a table.....and giving the exception error that Index cant be empty.
But When I am trying to insert data like this its working.
string cmdstr="INSERT INTO tblRegisteredUsers (UserID,TPwd,UserFName,UserLName) VALUES ('aaa','aaa','aaa','aaa')";
Whats wrong with this.......
I am not using any ASP code.....its just c# and ADO.net.
Thanks a lot for hlep.
Answers (1)
0
Hi
There are many different types of jobs in computer hardware. If you like
working with your hands and are interested in how computers and
networks function, this may be the ideal field for you.
If you want to more detail about computer hardware than go for this below link.
http://jobs.lovetoknow.com/Jobs_in_Computer_Hardware
0