PC Review


Reply
Thread Tools Rate Thread

Access remote database with IP address

 
 
=?Utf-8?B?QW5ndXM=?=
Guest
Posts: n/a
 
      15th Aug 2007
I got a code to access a database on a share drive and the code will be send
to users. But the drive map is different for everyone, for me it's x:\ but
others could be z:\...

i got the IP address of this drive as 12.345.678.90, how to put it into my
code? if the path is:

dim p as string
p="x:\share drive\folder\database.mdb\"

 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWljaGFlbA==?=
Guest
Posts: n/a
 
      15th Aug 2007
This is what you need:

p="\\12.345.678.90\share drive\folder\database.mdb\

Make sure you use the double backslash

Please rate this posting if helpful


Michael Arch.

"Angus" wrote:

> I got a code to access a database on a share drive and the code will be send
> to users. But the drive map is different for everyone, for me it's x:\ but
> others could be z:\...
>
> i got the IP address of this drive as 12.345.678.90, how to put it into my
> code? if the path is:
>
> dim p as string
> p="x:\share drive\folder\database.mdb\"
>

 
Reply With Quote
 
=?Utf-8?B?QW5ndXM=?=
Guest
Posts: n/a
 
      17th Aug 2007
I got an error message that '\\10.232.101.15\DS\SHIPPING.mdb' is not a valid
path...

If I just use "X:\DS\SHIPPING.mbd" then have no problem.

"Michael" wrote:

> This is what you need:
>
> p="\\12.345.678.90\share drive\folder\database.mdb\
>
> Make sure you use the double backslash
>
> Please rate this posting if helpful
>
>
> Michael Arch.
>
> "Angus" wrote:
>
> > I got a code to access a database on a share drive and the code will be send
> > to users. But the drive map is different for everyone, for me it's x:\ but
> > others could be z:\...
> >
> > i got the IP address of this drive as 12.345.678.90, how to put it into my
> > code? if the path is:
> >
> > dim p as string
> > p="x:\share drive\folder\database.mdb\"
> >

 
Reply With Quote
 
=?Utf-8?B?TWljaGFlbA==?=
Guest
Posts: n/a
 
      17th Aug 2007
OK,It could be the wrong IP address, you can verify that by going to the dos
prompt and pinging the server, if you can ping it, try mapping a network
pointing to the folder where your database resides, if it does not allow you
to connect to the network drive, you may have to use the server name somthing
like this:

\\ServerName\\DS\SHIPPING.mdb

You can also step through your code and place a msgbox that will show the
path, just to confirm that the parameter has the proper syntax.
So right after you do p="\\10.232.101.15\DS\SHIPPING.mdb"
Msgbox(p)


--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Angus" wrote:

> I got an error message that '\\10.232.101.15\DS\SHIPPING.mdb' is not a valid
> path...
>
> If I just use "X:\DS\SHIPPING.mbd" then have no problem.
>
> "Michael" wrote:
>
> > This is what you need:
> >
> > p="\\12.345.678.90\share drive\folder\database.mdb\
> >
> > Make sure you use the double backslash
> >
> > Please rate this posting if helpful
> >
> >
> > Michael Arch.
> >
> > "Angus" wrote:
> >
> > > I got a code to access a database on a share drive and the code will be send
> > > to users. But the drive map is different for everyone, for me it's x:\ but
> > > others could be z:\...
> > >
> > > i got the IP address of this drive as 12.345.678.90, how to put it into my
> > > code? if the path is:
> > >
> > > dim p as string
> > > p="x:\share drive\folder\database.mdb\"
> > >

 
Reply With Quote
 
=?Utf-8?B?QW5ndXM=?=
Guest
Posts: n/a
 
      20th Aug 2007
If my computer show '12.345.678.90'(X does it mean the IP is 12.345.678.90?

I ping and also msgbox it seems correct.

"Michael" wrote:

> OK,It could be the wrong IP address, you can verify that by going to the dos
> prompt and pinging the server, if you can ping it, try mapping a network
> pointing to the folder where your database resides, if it does not allow you
> to connect to the network drive, you may have to use the server name somthing
> like this:
>
> \\ServerName\\DS\SHIPPING.mdb
>
> You can also step through your code and place a msgbox that will show the
> path, just to confirm that the parameter has the proper syntax.
> So right after you do p="\\10.232.101.15\DS\SHIPPING.mdb"
> Msgbox(p)
>
>
> --
> If this posting was helpful, please click on the Yes button.
> Regards,
>
> Michael Arch.
>
>
>
>
> "Angus" wrote:
>
> > I got an error message that '\\10.232.101.15\DS\SHIPPING.mdb' is not a valid
> > path...
> >
> > If I just use "X:\DS\SHIPPING.mbd" then have no problem.
> >
> > "Michael" wrote:
> >
> > > This is what you need:
> > >
> > > p="\\12.345.678.90\share drive\folder\database.mdb\
> > >
> > > Make sure you use the double backslash
> > >
> > > Please rate this posting if helpful
> > >
> > >
> > > Michael Arch.
> > >
> > > "Angus" wrote:
> > >
> > > > I got a code to access a database on a share drive and the code will be send
> > > > to users. But the drive map is different for everyone, for me it's x:\ but
> > > > others could be z:\...
> > > >
> > > > i got the IP address of this drive as 12.345.678.90, how to put it into my
> > > > code? if the path is:
> > > >
> > > > dim p as string
> > > > p="x:\share drive\folder\database.mdb\"
> > > >

 
Reply With Quote
 
=?Utf-8?B?TWljaGFlbA==?=
Guest
Posts: n/a
 
      20th Aug 2007
Yes, however, it is quite unusual to see the ip address listed on the mapped
drive, because it means the whole server is being shared, this is not always
the case.
Just for testing try:
p="\\127.0.0.1 p\SHIPPING.mdb"
Make sure however, that the database exist in the C:\ drive before this
test; also make sure it exist under the directory you are pointing to.

p="\\10.232.101.15\DS\SHIPPING.mdb"

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Angus" wrote:

> If my computer show '12.345.678.90'(X does it mean the IP is 12.345.678.90?
>
> I ping and also msgbox it seems correct.
>
> "Michael" wrote:
>
> > OK,It could be the wrong IP address, you can verify that by going to the dos
> > prompt and pinging the server, if you can ping it, try mapping a network
> > pointing to the folder where your database resides, if it does not allow you
> > to connect to the network drive, you may have to use the server name somthing
> > like this:
> >
> > \\ServerName\\DS\SHIPPING.mdb
> >
> > You can also step through your code and place a msgbox that will show the
> > path, just to confirm that the parameter has the proper syntax.
> > So right after you do p="\\10.232.101.15\DS\SHIPPING.mdb"
> > Msgbox(p)
> >
> >
> > --
> > If this posting was helpful, please click on the Yes button.
> > Regards,
> >
> > Michael Arch.
> >
> >
> >
> >
> > "Angus" wrote:
> >
> > > I got an error message that '\\10.232.101.15\DS\SHIPPING.mdb' is not a valid
> > > path...
> > >
> > > If I just use "X:\DS\SHIPPING.mbd" then have no problem.
> > >
> > > "Michael" wrote:
> > >
> > > > This is what you need:
> > > >
> > > > p="\\12.345.678.90\share drive\folder\database.mdb\
> > > >
> > > > Make sure you use the double backslash
> > > >
> > > > Please rate this posting if helpful
> > > >
> > > >
> > > > Michael Arch.
> > > >
> > > > "Angus" wrote:
> > > >
> > > > > I got a code to access a database on a share drive and the code will be send
> > > > > to users. But the drive map is different for everyone, for me it's x:\ but
> > > > > others could be z:\...
> > > > >
> > > > > i got the IP address of this drive as 12.345.678.90, how to put it into my
> > > > > code? if the path is:
> > > > >
> > > > > dim p as string
> > > > > p="x:\share drive\folder\database.mdb\"
> > > > >

 
Reply With Quote
 
gimme_this_gimme_that@yahoo.com
Guest
Posts: n/a
 
      21st Aug 2007
Can you store the file on sharepoint where everyone can use the same
URL?

 
Reply With Quote
 
=?Utf-8?B?QW5ndXM=?=
Guest
Posts: n/a
 
      28th Aug 2007
Unfortunately we do not have a share point setup.

I ping the drive and everything looks good.

Is there any code that I can get the path info which can be used in vba code?

"(E-Mail Removed)" wrote:

> Can you store the file on sharepoint where everyone can use the same
> URL?
>
>

 
Reply With Quote
 
gimme_this_gimme_that@yahoo.com
Guest
Posts: n/a
 
      29th Aug 2007
On Aug 27, 9:08 pm, Angus <An...@discussions.microsoft.com> wrote:
> Unfortunately we do not have a share point setup.
>
> I ping the drive and everything looks good.
>
> Is there any code that I can get the path info which can be used in vba code?
>
>
>
> "gimme_this_gimme_t...@yahoo.com" wrote:
> > Can you store the file on sharepoint where everyone can use the same
> > URL?- Hide quoted text -

>
> - Show quoted text -


Try googling : "Enumerating network shares" on
microsoft.public.scripting.vbscript


Look for svrcheck.exe or try something like this:

Function getNetShares(strHostName)


Dim objWMIService
Dim colShares
Dim objShare
Dim strMyMsg


On Error Resume Next

' I don't know what \root\cimv2 is.

Set objWMIService = GetObject("winmgmts:" &
"{impersonationLevel=impersonate,authenticationLevel=Default}!\\" &
strHostName & "\root\cimv2")

Set colShares = objWMIService.ExecQuery("Select * from Win32_Share", ,
48)

For Each objShare in colShares
strMyMsg = "Share Name: " & vbTab & objShare.Name & vbCrLf
strMyMsg = strMyMsg & "Share Caption: " & vbTab &
objShare.Caption & vbCrLf
strMyMsg = strMyMsg & "Share Path: " & vbTab & objShare.Path &
vbCrLf
strMyMsg = strMyMsg & "Share Type: " & vbTab &
getShareType(objShare.Type) & vbCrLf
WScript.Echo strMyMsg
Next


Set objWMIService = Nothing
Set colShares = Nothing


getNetShares = Err.Number


End Function


getNetShares("my-machine")



 
Reply With Quote
 
gimme_this_gimme_that@yahoo.com
Guest
Posts: n/a
 
      29th Aug 2007
Oh yeah, can you prompt the user to navigate to the mdb file with a
FileOpenDialog?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
connect an email address in address book to an access database =?Utf-8?B?TGVzbGV5?= Microsoft Outlook Discussion 1 1st May 2006 04:50 PM
How to remote Access database from VB6 mamatha Microsoft VB .NET 4 12th Aug 2004 02:46 AM
access front-end with remote access back-end database jean-luc Microsoft Access 0 3rd Mar 2004 09:34 AM
Access to a remote MDB database from CF Rodney Mitchell Microsoft Dot NET Compact Framework 0 2nd Feb 2004 04:30 PM
Can access send data to a remote access database John from Mac Microsoft Access 1 16th Jan 2004 02:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:47 PM.