7 Replies - 907 Views - Last Post: 30 June 2013 - 08:58 PM Rate Topic: -----

#1 Neku  Icon User is offline

  • D.I.C Regular

Reputation: 20
  • View blog
  • Posts: 268
  • Joined: 21-May 09

connection problems

Posted 21 June 2013 - 08:53 AM

I have loaded to an FTP server a database file and I want to connect to it via my program.
this is the file address as it was given to me after the file was loaded: "http://wl.filegenie.com/~cherono/ADFDataBase.mdb"

I'v placed this address inside a variable called TstSorce and with the following sub i try to open the connection:

Public Sub OpenConnection()
If ConnectionString.State = 0 Then
     On Error Resume Next
          MsgBox Err.Description
          ConnectionString.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & TstSorce & ";User Id=admin;Password=;"
     If Err Then
     MsgBox Err.Description
          MsgBox "File is either not found or the server is offline" & vbCrLf & "or the connection string is currupted." & vbCrLf & "Please check your connection string and file user/password combo or try again later." & vbCrLf & "Error code:" & Err.Number
          Call MainForm.ConnConfig_Click
     End If
End If
End Sub



however I get an error "Bad File name"

what am I doing wrong and how can I fix it?
should I upload to a different site or maybe even go as making my own site?
help please

This post has been edited by Neku: 21 June 2013 - 09:23 AM


Is This A Good Question/Topic? 0
  • +

Replies To: connection problems

#2 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 301
  • View blog
  • Posts: 1,782
  • Joined: 26-March 09

Re: connection problems

Posted 21 June 2013 - 01:36 PM

Not sure you can access it that way...not that I've ever tried it personally

Have a look at this snippet taken from here

Using RDS (MS Remote)
Access database over HTTP. You must setup RDS on the server for his to work.


Provider=MS Remote;Remote Provider=Microsoft.Jet.OLEDB.4.0;
Remote Server=http://server.adress.com;Data Source=d:\myPath\myDatabase.mdf;

Was This Post Helpful? 0
  • +
  • -

#3 Neku  Icon User is offline

  • D.I.C Regular

Reputation: 20
  • View blog
  • Posts: 268
  • Joined: 21-May 09

Re: connection problems

Posted 21 June 2013 - 02:02 PM

do i actually have to put the file on an FTP server or maybe on some other server?
Was This Post Helpful? 0
  • +
  • -

#4 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: connection problems

Posted 21 June 2013 - 08:50 PM

Neku, I was actually able to navigate to the site. When I did so, I automatically downloaded the access file, and then opened it in Access and looked at some of the data. So, I would say the answer to your last question is no.

MS Remote is maybe one way to go. It's pretty insecure and was deprecated for that in favor of SOAP protocols several years ago. However, it does work. I've used it in a minimum security production envronment back around '04. I never used SOAP for this and now the doc is about nonexistent. Also, you might try navigating to the site in your browser and accessing the downloaded file directly. You can then use the InternetExplorer object (you can keep it invisible) to automate the download.
Was This Post Helpful? 0
  • +
  • -

#5 Neku  Icon User is offline

  • D.I.C Regular

Reputation: 20
  • View blog
  • Posts: 268
  • Joined: 21-May 09

Re: connection problems

Posted 22 June 2013 - 07:42 AM

well.. i guess i can try but if people download the file then how does the data get stored online for others to see?
do they have to download it every time and later on upload it or something like that?
i think this could also cause some unexpected problems and defficulties with my program and some of its functions
Was This Post Helpful? 0
  • +
  • -

#6 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: connection problems

Posted 29 June 2013 - 08:53 PM

Well, you never said you had to do that. :-P You can use MS Remote, if security isn't very important.
Was This Post Helpful? 0
  • +
  • -

#7 Neku  Icon User is offline

  • D.I.C Regular

Reputation: 20
  • View blog
  • Posts: 268
  • Joined: 21-May 09

Re: connection problems

Posted 30 June 2013 - 11:33 AM

how does it work? does it download the file or something?
Was This Post Helpful? 0
  • +
  • -

#8 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: connection problems

Posted 30 June 2013 - 08:58 PM

MS Remote provides a remote connection to a server. You just use an ADO ConnectionString that begins with "Provider=MS Remote;". Google around and you should see some examples.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1