Lost Password?

Go Back   CodeCall Programming Forum > Web Development Forum > ASP, ASP.NET and Coldfusion

ASP, ASP.NET and Coldfusion Microsoft's Web Development Language (ASP/ASP.NET) and Coldfusion discussion

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-20-2007, 09:39 PM
alvintafoya alvintafoya is offline
Newbie
 
Join Date: Sep 2007
Posts: 1
Rep Power: 0
alvintafoya is on a distinguished road
Exclamation ADO and ASP help needed

I am fairly new to Web programming and I need some help.
The following code snippet came from a page I wrote. The records are written to the database (SQL Server 2000) but the page never comes up after this point. I have narrowed the problem down to this loop, but I have no idea where to go from here.
Code:
SQLStmt="insert into tbl_wss_transpers (fld_ssn,fld_name,fld_adminuic,fld_hirestatus,fld_ ntlogon,fld_subscriptiondate,"
SQLStmt=SQLStmt & "fld_updatedate,fld_source,fld_approved,fld_locked ,fld_update,fld_password) "
SQLStmt=SQLStmt & "values('" & SSN & "','" & NAME & "','" & UIC & "','" & HIRE & "','" & EMAIL & "','" & DTESUB & "',"
SQLStmt=SQLStmt & "'" & DTEUPDT & "','" & SOURCE & "',0,0,0,'" & PASS & "')"
connection.BeginTrans
connection.Execute(SQLStmt)
connection.CommitTrans


set rsName=Server.CreateObject("adodb.recordset")
SQLStmt="select * from tbl_wss_services where fld_active=1 and fld_dpiadmin=0 order by fld_serviceid"
rsName.open SQLStmt,conn
rsName.MoveFirst
While not rsName.EOF
SERVID=rsName("fld_serviceid")
SERVNAME=rsName("fld_servicename")
If Request.Form(SERVID)= "Yes" then
strSQL="insert into tbl_wss_transservice(fld_ssn,fld_serviceid,fld_ser vicename) "
strSQL=strSQL & "values('" & SSN & "','" & SERVID & "','" & SERVNAME & "')"
connection.BeginTrans
connection.Execute(strSQL)
connection.CommitTrans
End If

rsName.Movenext
Wend
rsName.close
Like I said, the records actually make it to the database. The HTML portion of the page displays the records just written, but page execution stops after the above loop. Also the page takes an inordinate amount of time to load.
Any help would be greatly appreciated.

Thanks

Last edited by WingedPanther; 06-05-2008 at 03:48 PM. Reason: add code tags
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 06-04-2008, 08:39 AM
lartzi lartzi is offline
Newbie
 
Join Date: Jun 2008
Posts: 4
Rep Power: 0
lartzi is on a distinguished road
Default Re: ADO and ASP help needed

Why you don't use the "Stop" keyword and debug it and see exactly what is the problem?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-05-2008, 05:39 AM
chili5's Avatar   
chili5 chili5 is offline
Speaks fluent binary
 
Join Date: Mar 2008
Location: Canada
Age: 15
Posts: 1,224
Rep Power: 10
chili5 will become famous soon enough
Send a message via ICQ to chili5 Send a message via AIM to chili5 Send a message via MSN to chili5 Send a message via Yahoo to chili5
Default Re: ADO and ASP help needed

Welcome to Code Call.

If your asking a question, you should use tags to display your code, so it is easier to see.

Well I know nothing about ASP so I can't really help.
__________________
Success is the ability to go from failure to failure without losing your enthusiasm. ~ Winston Churchill
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-05-2008, 03:51 PM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Mod
 
Join Date: Jul 2006
Age: 35
Posts: 1,751
Last Blog:
Game software (GURPS)
Rep Power: 24
WingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to all
Default Re: ADO and ASP help needed

Try changing your loop to a Do While
Code:
Do While not rsName.EOF
  SERVID=rsName("fld_serviceid")
  SERVNAME=rsName("fld_servicename")
  If Request.Form(SERVID)= "Yes" then
    strSQL="insert into tbl_wss_transservice(fld_ssn,fld_serviceid,fld_ser vicename) "
    strSQL=strSQL & "values('" & SSN & "','" & SERVID & "','" & SERVNAME & "')"
    connection.BeginTrans
    connection.Execute(strSQL)
    connection.CommitTrans
  End If

  rsName.Movenext
Loop
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall

Last edited by WingedPanther; 06-05-2008 at 03:51 PM. Reason: format code
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 05:59 PM.

Contest Stats

John ........ 87.50000
dargueta ........ 75.00000
Xav ........ 50.00000
MeTh0Dz ........ 20.00000
gaylo565 ........ 18.00000
Johnnyboy ........ 3.00000

Contest Rules

Ads