SunQuest
           ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old March 10th, 2003, 01:40 PM
jkt182 jkt182 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 1 jkt182 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Access Database Connection String & Recordset (Help)

I am passing 3 hidden fields to another page using the method="post"

Here is the next page -
<%
Dim fmMemberID, fmUsername, fmPassword
fmMemberID = request.Form("memberID")
fmUsername = request.Form("username")
fmPassword = request.Form("password")
%>
<%
Dim dbConn
set dbConn = Server.CreateObject("ADODB.Connection")
dbConn.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=d:\inetpub\credencia.net\fpdb\members.mdb"
dbConn.Open

Dim rsMember
Set rsMember = Server.CreateObject("ADODB.Recordset")
rsMember.Open "SELECT * FROM Members WHERE MemberID=179", dbConn,
%>

What am I doing wrong here?

Reply With Quote
  #2  
Old March 21st, 2003, 01:02 AM
mohecan mohecan is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Melbourne, Australia
Posts: 212 mohecan User rank is Private First Class (20 - 50 Reputation Level)mohecan User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Do you have the ODBC client setup on your machine?

If not, there are a number of good threads on this site as well as Your First Database

Which has reference and guidelines on how to setup your machine for databases.
__________________
How can I soar like an eagle when
I'm flying with turkey's?

Reply With Quote
  #3  
Old March 25th, 2003, 02:40 PM
mtndew mtndew is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 6 mtndew User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi,
First thing, I find it more successful if I keep this line all on one line. Sounds goofy, but it works.
dbConn.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=d:\inetpub\credencia.net\fpdb\members.mdb"

Next, take the comma off the end of this line;

rsMember.Open "SELECT * FROM Members WHERE MemberID=179", dbConn,

I would also put my sql statement into a separate variable and then open the recordset using that variable like this;

src=""SELECT * FROM Members WHERE MemberID=179"

Better to refer to the variable containing the value you are looking for.
src=""SELECT * FROM Members WHERE MemberID= " & fmMemberID

dbConn.open src

I know it's 4 days after the fact, but I hope it helps.

Reply With Quote
  #4  
Old March 27th, 2003, 01:24 AM
yassoor's Avatar
yassoor yassoor is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Canada - Egypt
Posts: 60 yassoor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
What is the error that you get?
__________________
I hope this is of any help to anyone.

Yassoor
http://www.WebsitesCreation.ca

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Access Database Connection String & Recordset (Help)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway