Hello.

On 17/03/2010 04:16, Shen Nan wrote:
> I used SQLite ODBC Driver to display data in Excel, and everything works
> fine.
> Except in the connection String, I have to enter an absolute path, which is
> very troublesome every time I move the file.
> I wonder is there any way to specify relative path instead in the connection
> String?

You can do two things to (probably) fix this.
1. You can use a symbolic link to the moved database file. Use an 
absolute path to a location that should never change, and in that 
location, put a symbolic link to the database file; to create one, try 
the sysinternal utility here: 
http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx
2. If you move the database file with the Excel file, you can recreate 
the ODBC connection string in VBA every time you open the file by 
parsing the Excel document's path name and replacing the relative part.

Guy
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to