Not a valid file name

  • Thread starter G0itp via AccessMonster.com
  • Start date
G

G0itp via AccessMonster.com

As a complete novice, I'm having difficulties with the transfer of the
database to the web server,

everything works on the local machine, but on transfer I get the errors
" cannot initialise database" " not a valid file name"

the connection string is..... <a:ConnectionString>Provider=Microsoft.Jet.
OLEDB.4.0;User ID=Admin;Data Source=\\call12.mdb;Mode=Share Deny
None;Extended Properties=&amp;quot;&amp;quot;;Persist Security Info=False;Jet
OLEDB:System database=&amp;quot;&amp;quot;;Jet OLEDB:Registry
Path=&amp;quot;&amp;quot;;Jet OLEDB:Database
Password=&amp;quot;&amp;quot;;Jet OLEDB:Engine Type=0;Jet OLEDB:Database
Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk
Transactions=1;Jet OLEDB:New Database Password=&amp;quot;&amp;quot;;Jet OLEDB:
Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't
Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica
Repair=False;Jet OLEDB:SFP=False</a:ConnectionString>

Help!!!!
 
K

Ken Snell [MVP]

I don't have any experience with this specifically, but the "Data Source"
string appears to be incorrect?

Data Source=\\call12.mdb

Don't you need to specify the server name in there somewhere?
 
B

Brendan Reynolds

As Ken indicates elsewhere in this thread, if you're using UNC (as the \\
implies) you need to include the server name. You also need to include the
share name (the name of the shared drive or folder on the server). Something
like ...

Data Source = \\ServerName\ShareName\FileName.ext

Many of the elements you have included in the connection string seem to be
specifying the same values as the default values that would be applied if
these elements were not specified, and are therefore redundant. Specifying
them won't to any harm if they are specified correctly, but it does make the
connection string longer and more complex, and therefore more difficult to
troubleshoot. You may find it easier, at least during the initial set up and
testing, to use a simpler connection string, something like ...

Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=\\YourServerName\YourShareName\YourFileName.mdb;Persist Security
Info=False
 
B

Brendan Reynolds

BTW: If this is an internal server to which you have network access, the
easiest way to build a connection string is to use the Universal Data Link
utility, as follows ...

Open any convenient folder (doesn't have to be on the server, can be a local
folder such as your "My Documents" folder).

Right-click the folder background, and from the pop-up menu select "New",
then "New Text Document".

Change the name of the newly created "New Text Document.txt", giving it an
extension of ".udl" instead of ".txt", e.g. "Test.udl".

Double-click the renamed file to open it in the Universal Data Link editor.
By default, this utility assumes that you are using SQL Server, so click the
"Provider" tab, and from the list of providers select "Microsoft Jet 4.0 OLE
DB Provider". Go back to the "Connection" tab, and beside the text box
labelled "1. Select or enter a database name:" is a builder button you can
click to open a standard Windows open file dialog, where you can browse to
the location of the MDB.

When you've located the MDB and returned to the Universal Data Link editor,
click the "Test Connection" button to make sure everything is working OK.
When the connection is working, close the Universal Data Link utility.

Right-click the UDL file ("Test.udl" in this example) and from the pop-up
menu choose "Open with ..." From the list provided, choose Notepad (or your
text editor of choice). When the UDL file opens in your text editor, it will
look something like this ...

[oledb]
; Everything after this line is an OLE DB initstring
Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=\\YourServerName\YourShareName\YourFileName.mdb;Persist Security
Info=False

Ignore the "[oledb]" line and the comment, and copy only the line that
begins "Provider=".

You now have a valid and tested connection string that you can paste where
ever you need it.
 
G

G0itp via AccessMonster.com

Dear all

Thank you ALL for your help, it's been very useful and guided me down the
right path !!!!

I now have a different problem to solve

Thanks again

Robin

Brendan said:
BTW: If this is an internal server to which you have network access, the
easiest way to build a connection string is to use the Universal Data Link
utility, as follows ...

Open any convenient folder (doesn't have to be on the server, can be a local
folder such as your "My Documents" folder).

Right-click the folder background, and from the pop-up menu select "New",
then "New Text Document".

Change the name of the newly created "New Text Document.txt", giving it an
extension of ".udl" instead of ".txt", e.g. "Test.udl".

Double-click the renamed file to open it in the Universal Data Link editor.
By default, this utility assumes that you are using SQL Server, so click the
"Provider" tab, and from the list of providers select "Microsoft Jet 4.0 OLE
DB Provider". Go back to the "Connection" tab, and beside the text box
labelled "1. Select or enter a database name:" is a builder button you can
click to open a standard Windows open file dialog, where you can browse to
the location of the MDB.

When you've located the MDB and returned to the Universal Data Link editor,
click the "Test Connection" button to make sure everything is working OK.
When the connection is working, close the Universal Data Link utility.

Right-click the UDL file ("Test.udl" in this example) and from the pop-up
menu choose "Open with ..." From the list provided, choose Notepad (or your
text editor of choice). When the UDL file opens in your text editor, it will
look something like this ...

[oledb]
; Everything after this line is an OLE DB initstring
Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=\\YourServerName\YourShareName\YourFileName.mdb;Persist Security
Info=False

Ignore the "[oledb]" line and the comment, and copy only the line that
begins "Provider=".

You now have a valid and tested connection string that you can paste where
ever you need it.
As Ken indicates elsewhere in this thread, if you're using UNC (as the \\
implies) you need to include the server name. You also need to include the
[quoted text clipped - 38 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top