Solved

dsn-less connection

Posted on 2002-05-26
20
149 Views
Last Modified: 2010-05-02
Hi , can anyone tell me the connection string to open Access database located in a site in the internet using the following data using VB6:

databse name :  mmm.mdb
user name :  ""
password : ""

the database file located in the folder
http://test1.brink.com/ashraf

these information is not true but as an example

Thanx
0
Comment
Question by:ashraf_t
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 9
20 Comments
 
LVL 33

Expert Comment

by:hongjun
ID: 7035250
>>to open Access database located in a site in the internet
Are they in the same web server as your asp file?

DSNLess Connection for Access
http://www.able-consulting.com/ADO_Conn.htm#ODBCDriverForAccess


hongjun
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7035269
you already asked this question (http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20303647) and there was no answer to it. Access alone cannot do it. You need a something like a WebService or DCOM to do it. Or move to SQL server.
0
 

Author Comment

by:ashraf_t
ID: 7035374
for hongiun , what is the asp file ??

for emoreau , u can go to the site www.brinkster.com , it is possoble to open access database file
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:ashraf_t
ID: 7035375
for hongiun again, i saw the site u send but i noticed that the example open a database file from the hard disk C , i want to open it from a web site ?!
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7035381
>>for emoreau , u can go to the site www.brinkster.com , it is possoble to open access database file

Yes you can use Brinkster to store your MDB file but you will not be able to have a VB application run on a client PC opening an Access database on Brinkster.
0
 

Author Comment

by:ashraf_t
ID: 7035391
for emoreau : u can read there and u will see that they r talking about connection to the access db
they r using this example:
DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" server.MapPath ("username\db\mmm.mdb")
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7035397
>> server.MapPath

SERVER is an object that you can use in VBScript. I have contacted Brinkster support about a month ago to know it were possible to connect to an Access database using a regular VB6 app and they told me that it can be done. Access to the database must be done server-sided.
0
 

Author Comment

by:ashraf_t
ID: 7035467
so they told u it can be done ! , so how can i make it as u said ?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7035474
If you can do VB.Net, use create a WebService that will return a recordset.

If you do VB6, you will need to use DCOM and I don't know if they support it.

After there answer, I stopped my project.
0
 

Author Comment

by:ashraf_t
ID: 7039035
Anyway , can u tell me about a site which describe how to use VBscript with good examples , Thanx
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7039196
0
 

Author Comment

by:ashraf_t
ID: 7040208
nice examples but do u know why iam always recieving an error saying that object Server not found

ps: iam using the frontpage 2000 to write the code , is this right?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7040258
server is an object that must run in VBScript on a IIS server.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7040259
load the sample to your brinkster account to test it.
0
 

Author Comment

by:ashraf_t
ID: 7040363
if u mean to the site , yes i did that but same error message
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 50 total points
ID: 7040745
upload a copy of nwind.mdb database to your brinkster db folder and copy this to a file called default.asp into your brinkster account:

<%
Option Explicit
Response.Expires = -1000

Dim oConn
Dim oRS
Dim sSQL
Dim sColor

Response.Write("<font size=2 face=arial>")
Response.Write("Brinkster Example #1<br>")
Response.Write("Database Select Example Using Microsoft's Northwind Sample Database<br><br>")

Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\YourAccountNameGoesHere\db\nwind.mdb"))

sSQL = "SELECT ProductName, QuantityPerUnit, UnitPrice, UnitsInStock FROM Products"
Set oRS = oConn.Execute(sSQL)

    Response.Write("<table border=1 cellpadding=1 cellspacing=1 style='font-family:arial; font-size:10pt;'>")
    Response.Write("<tr bgcolor=black style='color:white;'><td>Product Name</td>")
    Response.Write("<td>Quantity Per Unit</td>")
    Response.Write("<td align=right>Price</td>")
    Response.Write("<td>In Stock</td></tr>")

sColor = "white"

Do While NOT oRS.EOF

    If sColor = "silver" Then
         sColor = "white"
    Else
         sColor = "silver"
    End If
 
    Response.Write("<tr bgcolor='" & sColor & "'>")
    Response.Write("<td>" & oRS("ProductName").Value & "</td>")
    Response.Write("<td>" & oRS("QuantityPerUnit").Value & "</td>")
    Response.Write("<td align=right>$" & oRS("UnitPrice").Value & "</td>")
    Response.Write("<td align=right>" & oRS("UnitsInStock").Value & "</td></tr>")
   
    oRS.MoveNext

Loop

    Response.Write("</table><br><br>")

oConn.Close
Set oRS = Nothing
Set oConn = Nothing

%>
0
 

Author Comment

by:ashraf_t
ID: 7046487
what part of the asp page i will put this code ?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7046593
Use this script as your complete page first and run it. Once you have it working, start adding what you want.

I just thought of your FrontPage document: is the extension is .ASP? It has to be .ASP because you need scripts to be runned at the server!
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7060740
any progress?
0
 

Author Comment

by:ashraf_t
ID: 7068515
Thanx for ur help
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Reading the Contents of a Directory In Access VBA 5 89
using web browser with BING 40 136
Problem to line 23 74
Help with Classic ASP - Parameterizing Query 16 24
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question