•
•
•
•
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
![]() |
•
•
Join Date: Oct 2006
Location: South Africa
Posts: 13
Reputation:
Rep Power: 2
Solved Threads: 0
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.
<%
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.
•
•
Join Date: Jul 2005
Location: Dallas, TX
Posts: 481
Reputation:
Rep Power: 4
Solved Threads: 19
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=;"
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=;"
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP Marketplace
•
•
•
•
.net access activation ajax algos api asp blogger blogging blogs code combo custom dani daniweb data debugging development dropdownlist feed fortitude gdata google gpl hope innovation key linux microsoft module net news office product programming reuse rss serial skin source struggle tags theme trial-and-error victory vista web wysiwyg xml
- ASP To Access (ASP)
- Error 'not all code paths return a value' (C#)
- Connecting ASP to Ms Access (ASP)
- Pygtk scrollbar (Python)
- C Quest 2 (C)
- How to "delete" this memory??? (C++)
- float declaration problem (Java)
Other Threads in the ASP Forum
- Previous Thread: DSNs ASP and windows x64
- Next Thread: Connecting ASP to Ms Access


Linear Mode