Heya, got a small confusing problem I was wondering if anyone could point
out and make me look dumb :P
In the below fragment, GetNewDatabaseInfo() returns a ConnectionString and
a DatabaseName. The connectionstring is built up using the
PromptDataSource() function in ADODB.
I close my connection, set the new source, open the connection, then call
CREATE DATABASE, -but- it gets created on the OLD original server.
Am I missing something really simple here? My brains a little mushy at the
moment.
AConnectionString := dmSteamMan.ADOConnection.ConnectionString;
if GetNewDatabaseInfo(AConnectionString, ADatabaseName) then
begin
try
dmSteamMan.ADOConnection.Close;
dmSteamMan.ADOConnection.ConnectionString := AConnectionString;
dmSteamMan.ADOConnection.Open;
SQLExecFmt('CREATE DATABASE %s', [ADatabaseName]);
SQLExecFmt('USE %s', [ADatabaseName]);
--
Inspired by the taste of horror, proud to be insane forever
Let out the killer in me! (c) Dismal Euphony
Now Playing: Joy Electric - Losing Touch
---------------------------------------------------------------------------
New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz