|
| |
|
|
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.
|
|
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
|
|
|