» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > ASP forums and Tips

ASP forums and Tips Talk about ASP Scripting. .net and Cold Fusion as well.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-22-2006, 02:57 PM
branson branson is offline
Junior Member
 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
branson is on a distinguished road
Default Page not displaying

Following is a function on button click event to display the details of an user. If I include this function page is not displaying. Can u tell me where the mistake is?

[code]

sub DisplayData()
dim Idn
Idn = document.all("Display").value
<%dim rsDisplay
set rsDisplay=server.createobject("ADODB.Recordset")
rsDisplay.open "Select * from Personal where Id='" & Idn & "'"
if not rsDisplay.eof then %>
with document
.all("Id").value = <%rsDisplay.fields(0).value%>
.all("Name").value = <%rsDisplay.fields(1).value%>
.all("Age").value = <%rsDisplay.fields(2).value%>
.all("Address").value = <%rsDisplay.fields(3).value%>
.all("Email").value = <%rsDisplay.fields(4).value%>
end with
end if
<%set rs = nothing%>
end sub
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 08-22-2006, 02:58 PM
komodo23 komodo23 is offline
OSP Starters
 
Join Date: Jun 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
komodo23 is on a distinguished road
Default

I am not sure this has anything to do with it, but you really don't need to close and reopen your delimiters.

Code:
<%
sub DisplayData()
dim Idn
Idn = document.all("Display").value
dim rsDisplay
set rsDisplay=server.createobject("ADODB.Recordset")
rsDisplay.open "Select * from Personal where Id='" & Idn & "'"
if not rsDisplay.eof then %>
with document
.all("Id").value = <%rsDisplay.fields(0).value%>
.all("Name").value = <%rsDisplay.fields(1).value%>
.all("Age").value = <%rsDisplay.fields(2).value%>
.all("Address").value = <%rsDisplay.fields(3).value%>
.all("Email").value = <%rsDisplay.fields(4).value%>
end with
end if
set rs = nothing
end sub
%>

but then try running some response. Write sta -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


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

vB 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
Basics : On-Page Optimization, few things you shouldn't miss !! pumice Premium Webmaster Articles 12 06-17-2007 02:15 AM
installing 5.0 on Windows XP gives problem... Elisabeth MySQL Forums 0 08-01-2006 01:24 PM
on which page i place link lance Link Building 3 04-01-2006 01:58 PM
home page links and internal page links!! juliana Link Building 5 03-28-2006 12:48 PM
yahoo returning the index page erica Yahoo 2 03-26-2006 06:11 AM


All times are GMT. The time now is 03:40 PM.