I have an issue whereby when I move my development application from one machine to another I need to modify the parameters in the TDatabase component (for the connection to my SQL Server 7.0 database)
I usually create an ODBC connection (ODBCConnect1) and point this to the appropriate SQL Server database (call it Database1)
I then add my TDatabase component to my global datamodule, give it a name, set the Driver to be 'SQL server' and then set the Params within the component as follows :
DATABASE NAME=Database1
USER NAME=sa
ODBC DSN=ODBCConnect1
PASSWORD=password
If I now move the application to another machine (running against a SQL Server with a different password, obviously the connection fails.
I then have to re-edit these Params to be correct for the machine (and SQL Server) I'm running the application on / against.
Ideally I'd like to be in a position where I could move my application (and source files) between machine (and similarly to client machines) without having to rebuild the application with the 'password' appropriate for the SQL Server I'm running up against.
I've tried not setting the Params in the TDatabase and setting the 'AliasName' to be the name of the ODBC connection (ODBCConnect1) but when I then move the application to a different machine I get an error that the connection cannot be made as it is not a trusted connection (cannot log on the 'sa' user).
Anyone have any thoughts on this ?
THanks in advance
Steve
I usually create an ODBC connection (ODBCConnect1) and point this to the appropriate SQL Server database (call it Database1)
I then add my TDatabase component to my global datamodule, give it a name, set the Driver to be 'SQL server' and then set the Params within the component as follows :
DATABASE NAME=Database1
USER NAME=sa
ODBC DSN=ODBCConnect1
PASSWORD=password
If I now move the application to another machine (running against a SQL Server with a different password, obviously the connection fails.
I then have to re-edit these Params to be correct for the machine (and SQL Server) I'm running the application on / against.
Ideally I'd like to be in a position where I could move my application (and source files) between machine (and similarly to client machines) without having to rebuild the application with the 'password' appropriate for the SQL Server I'm running up against.
I've tried not setting the Params in the TDatabase and setting the 'AliasName' to be the name of the ODBC connection (ODBCConnect1) but when I then move the application to a different machine I get an error that the connection cannot be made as it is not a trusted connection (cannot log on the 'sa' user).
Anyone have any thoughts on this ?
THanks in advance
Steve