RE: Remote Login, using dbi:ODBC



This really isn't a perl/dbi issue. If it's an MS access database, you
need to be able to access the MDB file itself. Thus, there is no
server/port, etc.

Jeff


-----Original Message-----
From: Richard [mailto:rjones@xxxxxxxxxx]
Sent: Sunday, October 23, 2005 2:33 AM
To: dbi-users@xxxxxxxx
Subject: Remote Login, using dbi:ODBC
Importance: High

I login to my remote mysql databases, using perl, this way:







sub ConnectToDB

{

my $host_name = "01.002.003.04";# Ip Address Here

my $db_name = "DataBaseName"; # Database Name to connect to

my $dsn = "DBI:mysql:host=$host_name;database=$db_name";

return (DBI->connect ($dsn, "usernameHere", "PasswordHere",


{PrintError => 0, RaiseError => 1}));

}



So, to connect to a Remote Access Database, can I use this:





sub ConnectToDB

{

my $host_name = "002.003.004.05";

my $db_name = "DBName";

my $dsn =
"dbi:ODBC:Clients:host=$host_name;database=$db_name";

return (DBI->connect ($dsn, "UserNameHere",
"PassWordHere")); #
Clients being the name I set in the Windows Data Sources (ODBC)

}





Is that how I would connect to this database?



I would appreciate any help you could give me.



Thanks!

Richard



.



Relevant Pages

  • runtime error 3265 : Item cannot be found in the collection corresponding to the requested name or
    ... remote Access Database by ADO and ADOX. ... Dim oCat As ADOX.Catalog ... Dim oTab As ADOX.Table ...
    (microsoft.public.vb.database.ado)
  • Re: Accessing remote MS Access DB thru IIS App
    ... It uses the ADO 2.5 library to give users OLEDB and ODBC access from ... your IIS Application" ... ... "Do not use an Access database on a remote ... Access database from a compiled IIS Application? ...
    (microsoft.public.inetserver.asp.components)
  • Drag and Drop MS Access Database on Remote Server?
    ... The project has been copied to a commercial hosting service's remote server. ... for the Access database was different on my notebook than on the remote ... the script name and append the name of the Access Database. ... This the connection string generated by Visual Studio! ...
    (microsoft.public.vsnet.debugging)
  • Re: How to access...
    ... MDB is an MS Access database. ... native Foxpro format. ... Your easiest entry point will likely be a remote view from VFP into your ... There is a TON of information in the help file about using ...
    (microsoft.public.fox.programmer.exchange)
  • RE: Remote Login, using dbi:ODBC
    ... > Subject: Remote Login, using dbi:ODBC ... > I login to my remote mysql databases, using perl, this way: ... > sub ConnectToDB ... > So, to connect to a Remote Access Database, can I use this: ...
    (perl.dbi.users)