Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 20th, 2007, 10:09 PM   #1
alvintafoya
Newbie
 
Join Date: Sep 2007
Posts: 1
Rep Power: 0 alvintafoya is on a distinguished road
Question Need Quick Help for ADO in an ASP page

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.

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_servicename) "
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
alvintafoya is offline   Reply With Quote
Old Sep 20th, 2007, 10:30 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 9 DaWei is on a distinguished road
How to Post.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML page to created which can be edited.... and same thing is retained in page . anant_tickoo HTML / XHTML / CSS 10 Nov 30th, 2006 12:10 PM
PHP sessions/ page refresh??? ktsirig PHP 2 Jun 1st, 2006 4:16 PM
PySite - Web Development Framework Sane Python 15 Mar 27th, 2006 7:39 PM
Page Replacement Program (C++) redhatter Existing Project Development 1 Nov 20th, 2005 10:38 AM
Force footer to bottom of page Obtruse_Man4 HTML / XHTML / CSS 145 Nov 13th, 2005 2:02 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:33 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC