• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 164
  • Last Modified:

dsn-less connection

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
ashraf_t
Asked:
ashraf_t
  • 10
  • 9
1 Solution
 
hongjunCommented:
>>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
 
Éric MoreauSenior .Net ConsultantCommented:
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
 
ashraf_tAuthor Commented:
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!

 
ashraf_tAuthor Commented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
>>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
 
ashraf_tAuthor Commented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
>> 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
 
ashraf_tAuthor Commented:
so they told u it can be done ! , so how can i make it as u said ?
0
 
Éric MoreauSenior .Net ConsultantCommented:
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
 
ashraf_tAuthor Commented:
Anyway , can u tell me about a site which describe how to use VBscript with good examples , Thanx
0
 
ashraf_tAuthor Commented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
server is an object that must run in VBScript on a IIS server.
0
 
Éric MoreauSenior .Net ConsultantCommented:
load the sample to your brinkster account to test it.
0
 
ashraf_tAuthor Commented:
if u mean to the site , yes i did that but same error message
0
 
Éric MoreauSenior .Net ConsultantCommented:
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
 
ashraf_tAuthor Commented:
what part of the asp page i will put this code ?
0
 
Éric MoreauSenior .Net ConsultantCommented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
any progress?
0
 
ashraf_tAuthor Commented:
Thanx for ur help
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 10
  • 9
Tackle projects and never again get stuck behind a technical roadblock.
Join Now