E: Range Check Error on SQLConnection.open
Posted: Tue 27 May 2008 13:34
Hi!
We have some unique problem amongst our customers. This customer has Windows XP Pro SP2 O/S with Oracle database runnig for some their software and our software running on MSDE/MSSQL Server 2005 express software. Yestersday they reported that while starting our software, they get an error. I have tried many things including removing MSDE and since MSDE could not be installed, I installed MS SQLServer express SP2 today. Using Management Studio Express I had no problem browsing the database but our software still refuses to connect. Our software still uses dbexpsda30.dll version 3.10.8 (because newer versions have problems with ntext fields). I use BDS2006 Delphi.
This is the code, that is used to connect:
From all our installations, only on this computer the connection fails so something is wrong on this computer. Since I get only E: Range Check Error I am not sure where to search.
Does anybody have a clue where to search or what could be wrong?
Best regards,
Goran
Audax d.o.o.
We have some unique problem amongst our customers. This customer has Windows XP Pro SP2 O/S with Oracle database runnig for some their software and our software running on MSDE/MSSQL Server 2005 express software. Yestersday they reported that while starting our software, they get an error. I have tried many things including removing MSDE and since MSDE could not be installed, I installed MS SQLServer express SP2 today. Using Management Studio Express I had no problem browsing the database but our software still refuses to connect. Our software still uses dbexpsda30.dll version 3.10.8 (because newer versions have problems with ntext fields). I use BDS2006 Delphi.
This is the code, that is used to connect:
Code: Select all
function TdmSkupno.PoveziStreznik : Boolean;
function PoveziSQL(var AMsg : String) : integer;
begin
AMsg := '';
Result := -1;
with sqlConn do
try
Logger(logTrail, 'trying to connect ' + glSkupno.NastZbirka.Server);
Open; // 0 then
Result := -10;
if Pos('delay in opening server connection', LowerCase(AMsg)) >0 then
Result := -10;
end;
end;
end;
var
iRez : Integer;
sMsg : String;
begin
with sqlConn do
begin
Close;
ConnectionName := 'SQLServerConnection';
DriverName := 'SQLServer';
GetDriverFunc := 'getSQLDriverSQLServer';
LibraryName := 'dbexpsda30.dll';
VendorLib := 'sqloledb.dll';
Params.Clear;
Params.Add('BlobSize=-1');
Params.Add('User_name=' + glSkupno.NastZbirka.Uporabnik);
Params.Add('Password=' + glSkupno.NastZbirka.Geslo);
Params.Add('Hostname=' + glSkupno.NastZbirka.Server);
Params.Add('DataBase=' + glSkupno.NastZbirka.Zbirka);
Params.Add('LongStrings=True');
Params.Add('EnableBCD=False');
Params.Add('FetchAll=True');
// Params.Add('UseUnicode=True');
LoginPrompt := False;
KeepConnection := True;
end;
sMsg := '';
iRez := PoveziSQL(sMsg);
if iRez = -10 then
//timeout, trying to reconnect
iRez := PoveziSql(sMsg);
Result := iRez = 0;
if not Result then
MsgBox('An error has occured while connecting to the server.' + ^m +
'The application will now exit.' + ^m +
'Error:' + ^m + sMsg,
'Error', mtError, [mbOK]);
end;
Does anybody have a clue where to search or what could be wrong?
Best regards,
Goran
Audax d.o.o.