navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Post or Display Data from an External Access database

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Post or Display Data from an External Access database
Page: [1]
 
autumn1978

 

Posts: 23
Joined: 2/6/2006
Status: offline

 
Post or Display Data from an External Access database - 3/13/2008 21:16:57   
I need to display database results from an external database using custom ASP. Not sure what the connection string should be. The following code works in the same web where the database is located, but doesn't work on my other web site. I don't have a dedicated server. Can you help?


<body>
<table>
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open Server.MapPath("/fpdb/mydb.mdb")

set rs=Server.CreateObject("ADODB.recordset")

rs.open "SELECT * FROM tbl_postback",conn
do until rs.eof
Response.Write "<tr>" & "<td>" & (rs("campname")) & "</td>" & "</tr>"
rs.movenext
loop
%>
</table>
rdouglass

 

Posts: 9167
From: Biddeford, ME USA
Status: offline

 
RE: Post or Display Data from an External Access database - 3/13/2008 21:39:36   
quote:

database results from an external database using custom ASP.


Can you describe "external" a little better? Do you mean a network share or something like that?

You can do something like this:

conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Z:\myshare\webbase.mdb"

or something to that effect. It doesnt have to use the mapppath command.

That help any?



_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to autumn1978)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Post or Display Data from an External Access database
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts