Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Active Server Pages (ASP)
Expertise: Beginner
Jul 19, 1999

Database Connection from ASP to dbase IV

Question:
I have made a databaseconnection to a dbase IV database in VisualInterdev (with global.asa).
In the Data View window I can see the tables, but when I open a databaseconnection
in an ASP file I get the following error [Microsoft][ODBC dBase Driver] '(unknown)'
is not a valid path. Make sure that the path name is spelled correctly and that you are
connected to the server on which the file resides. Error has occurred in the following line:
DataConn.Open Application("Connection1_ConnectionString") I use the following code:

strSql = "select * from events"

Set DataConn	= Server.CreateObject("ADODB.Connection")
Set cmdTemp		= Server.CreateObject("ADODB.Command")
DataConn.Open Application("Connection1_ConnectionString")
Set cmdTemp.ActiveConnection = DataConn
Set RS = Server.CreateObject("ADODB.RecordSet")
cmdTemp.CommandText = strSql
RS.Open cmdTemp, , 0, 1



In global.asa Application("Connection1_ConnectionString")
is defined as "Provider=MSDASQL.1;Persist Security Info=False;
Extended Properties=""CollatingSequence=ASCII;
DBQ=F:\Temp;DefaultDir=F:\Temp;
Deleted=1;Driver={Microsoft dBase Driver (*.dbf)};DriverId=277;FIL=dBase III;
ImplicitCommitSync=Yes;MaxBufferSize=512;MaxScanRows=8;
PageTimeout=600;SafeTransactions=0;Statistics=0;
Threads=3;UID=admin;UserCommitSync=Yes;
"";Initial Catalog=F:\Temp;"
Do you know what I have done wrong?

Answer:
Your problem has a simple solution.

You can see the dbase files since it is on your "F:\..." drive.
Your Web server cannot see them, since it has no "F:\.." drive.

Set up an ODBC dsn on your Web Server that can see your dbase database and use the name of the ODBC DSN as your Connection String.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date