Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old October 7th, 2008, 08:26 AM
Newbie
 
Join Date: Oct 2008
Posts: 2
Default update command within For loop in ASP

I gave update command inside for loop.. and the query values are perfectly correct..but when i give con.execute(updateqry) i end up with an error....
Please help me...
Reply
  #2  
Old October 7th, 2008, 09:00 AM
Newbie
 
Join Date: Oct 2008
Posts: 21
Default

Hi!

You try this, after your update query

1. response.end
2. my_Conn.Execute(updateSql)

for ex:
UPDATE tbl_data SET STATNAME='NOWINSKA NATALIA GRACJA', H1subj1='CL', H1subj2='-', H1subj3='-', H2subj1='CHEM', H2subj2='ECONS', H2subj3='MATH', H2subj4='PHY' WHERE IDNO='F1781667P';

3. Now you check the fieldname is correct and check the value is correct.
4. If the field value and fieldname is correct you copy this query and test directly in your database. Its run successfully....
5. In query no mistake.
6. so you check your table fieldname and your html form the text box or combo box id or name is same.

for ex:
table fieldname = username;
&
Text box<input type=text id="username" name="username">
Reply
  #3  
Old October 7th, 2008, 10:09 AM
DrBunchman's Avatar
Moderator
 
Join Date: Jan 2008
Location: Winchester, UK
Posts: 924
Default

Hi vanithapraveen,

What's the error?

Dr B
Reply
  #4  
Old October 9th, 2008, 06:21 AM
Newbie
 
Join Date: Oct 2008
Posts: 2
Default

Hi ma...

just i receive internal server error... i executed the query directly in mssql...it is working...but after i give execute i end up with an error...
Reply
  #5  
Old October 9th, 2008, 02:26 PM
DrBunchman's Avatar
Moderator
 
Join Date: Jan 2008
Location: Winchester, UK
Posts: 924
Default

And what is the actual error???? If you print it here there's far more chance of you getting some help!

Dr B
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles