?
Solved

dsn-less connection

Posted on 2002-05-26
20
Medium Priority
?
160 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
Technology Partners: 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
 

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month8 days, 22 hours left to enroll

765 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