ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

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 ASP Free Forums Sponsor:
  #1  
Old February 29th, 2000, 02:28 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
Unable to retrieve from a "Query" with Microsoft Access 97!

<i><b>Originally posted by : Daniel Macfie (dmacfie@hof.co.uk)</b></i><br />Wonder if you could help...<br /><br />I'm trying to retrieve some information from some so-called "Query" from within Access, but am unable to for some reason. Retrieving info. from a "Table" is working fine, but would anyone know the syntax for retrieving from a "Query"? (It seems that simply entering the name doesn't work, and the name for the "Query" isn't recognised.)<br /><br />I'm totally stuck!<br /><br />Many thanks for your help in advance.<br /><br />Daniel Macfie.

Reply With Quote
  #2  
Old March 1st, 2000, 12:56 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : Mike B (mikeb811@hotmail.com)</b></i><br />You can try the code below, you will have to change the database information and the query name but it should work.<br /><br /><!-- #include file="adovbs.inc" --><br /><html><br /><head><title>Test</title></head><br /><BODY><br /><%<br />Set conn = Server.CreateObject("ADODB.Connection")<br />driv = "driver={Microsoft Access Driver (*.mdb)}"<br />conn.Open driv & ";dbq={dbloc goes here}"<br /><br />set objCmd = server.CreateObject("ADODB.Command")<br />objCmd.CommandType=adCmdStoredProc<br />objCmd.CommandText="Query1" ' should be Access query name<br />objCmd.ActiveConnection=conn<br /><br />set rs = objCmd.Execute<br />for each f in rs.fields<br /> response.write("field = " & f.name&"<br>")<br />next<br /><br />rs.close<br />set rs = nothing<br />set objCmd = nothing<br />conn.close<br />set conn = nothing<br />%><br /></body><br /></html><br /><br />Hope this helps.<br /><br />Mike<br /><br /><br /><br />------------<br />Daniel Macfie at 2/29/2000 12:28:24 PM<br /><br />Wonder if you could help...<br /><br />I'm trying to retrieve some information from some so-called "Query" from within Access, but am unable to for some reason. Retrieving info. from a "Table" is working fine, but would anyone know the syntax for retrieving from a "Query"? (It seems that simply entering the name doesn't work, and the name for the "Query" isn't recognised.)<br /><br />I'm totally stuck!<br /><br />Many thanks for your help in advance.<br /><br />Daniel Macfie.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > Unable to retrieve from a "Query" with Microsoft Access 97!


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 6 hosted by Hostway