Board index » delphi » A little problem with ADOConnection

A little problem with ADOConnection


2004-06-03 07:05:50 AM
delphi20
Hi
I set the connection string of a ADOConnection to Microsoft jet oledb 5
provider and to a location in my hard disc.
I want to make this ADOConnection to work every where that my application
is, so I declare a variable and set the path of my application to it (by
using ExtractFilePath( Application.ExeName )) but when I start the program I
give an error message that the string is long so I declare 4 variables and
set the Connection String to them and finally to
ADOConnection.ConnectionString.
but I receive an "Access violation" error message!
Please tell me how I can solve this problem.
I want my program work every where I copying it!
Thanks in advance
Mohammad-Reza Taikandi
 
 

Re:A little problem with ADOConnection

Mohammad-Reza Taikandi writes:
Quote
I set the connection string of a ADOConnection to Microsoft jet oledb 5
provider and to a location in my hard disc.
I want to make this ADOConnection to work every where that my application
is, so I declare a variable and set the path of my application to it (by
using ExtractFilePath( Application.ExeName )) but when I start the program I
give an error message that the string is long so I declare 4 variables and
set the Connection String to them and finally to
ADOConnection.ConnectionString.
but I receive an "Access violation" error message!

Please tell me how I can solve this problem.
I want my program work every where I copying it!
Post your code.
--
jc
Remove the -not from email