User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 397,809 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,519 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 1066 | Replies: 2 | Solved
Reply
Join Date: Oct 2006
Location: South Africa
Posts: 13
Reputation: Goitse is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Goitse Goitse is offline Offline
Newbie Poster

Help Code Giving Error

  #1  
Feb 7th, 2007
Here is the Code that you required CampKev

<%
Dim Conn
Dim sSQL
Dim rsPeople

Set Conn = CreateObject("ADODB.Connection")
Set rsPeople = CreateObject("ADODB.Recordset")
Conn.Open "addresses"
sSQL = "select Person_Id, First_Name, Last_Name, Phone_Number from Persons "
rsPeople.Open sSQL, Conn

%>
<html>
<head>
<title>Connecting TO The Database</title>
</head>
<body bgcolor = "#FFFFFF">
<center>
<h1>Address Book</h1>
<br>
<table border = 1>
<tr>
<th>Name</th>
<th>Number</th>
</tr>
<% Do Until rsPeople.EOF%>
<tr>
<td><%=rsPeople("Last_Name")%>,
<%=rsPeople("First_Name")%></td>
<td><%=rsPeople("Phone_Number")%></td>
</tr
><% rsPeople.MoveNext
Loop
rsPeople.Close
Set rsPeople = Nothing
Conn.Close
Set Conn = Nothing%>
</table>
</body>
</html>

I hope you can find the problem.

Thanks in advance.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2005
Location: Dallas, TX
Posts: 481
Reputation: campkev is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: Code Giving Error

  #2  
Feb 7th, 2007
what's the error? is this from another thread? why didn't you post as followup in that thread instead of starting new thread?
Reply With Quote  
Join Date: Jul 2005
Location: Dallas, TX
Posts: 481
Reputation: campkev is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: Code Giving Error

  #3  
Feb 7th, 2007
ok, found your original post. Your problem is you have no connection string telling it what type of db this is("access") or what the file name of your access database is

you need to pass it something like this
"Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Work\cvs_root\log4net-1.2\access.mdb;UID=;PWD=;"
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

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

 

DaniWeb ASP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the ASP Forum

All times are GMT -4. The time now is 6:18 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC