John Jacobs
2007-10-29 19:32:36 UTC
We are working on migrating our application form BDE (paradox) to dbexpress
and sql server 2005 sp2. We're getting some interesting error messages when
running queries that look at the master database. We are using "Borland®
Developer Studio for Microsoft® WindowsT Version 10.0.2288.42451 Update 2".
One of the queries I'm having problems with looks like this:
select loginame=rtrim(loginame), hostname,
dbname = case
when dbid = 0 then null
when dbid <> 0 then db_name(dbid)
end
,Login_Time,nt_userName
from master.dbo.sysprocesses
where db_Name(dbid) = 'LubeData' and dbId <> 0
I'm creating the TSQLQuery component on the fly and associating it to the
SQLConnection. Then when I open it I get the following error:
Project xxx raised exception class EDatabaseError with message 'Database
Server Error: SQL State: HY000, SQL Error Code: 0
Protocal error in TDS stream.
I've plugged the the above query into sql server management studio and it
works, and It also working in Data Explorer. Also if I drop a TSQLQuery
Component onto a datamodule and fill in the above query I can Set the state
to active without error at design time. But when I try to set it to active
at run time I get the error.
Any Ideas?
Thanks
and sql server 2005 sp2. We're getting some interesting error messages when
running queries that look at the master database. We are using "Borland®
Developer Studio for Microsoft® WindowsT Version 10.0.2288.42451 Update 2".
One of the queries I'm having problems with looks like this:
select loginame=rtrim(loginame), hostname,
dbname = case
when dbid = 0 then null
when dbid <> 0 then db_name(dbid)
end
,Login_Time,nt_userName
from master.dbo.sysprocesses
where db_Name(dbid) = 'LubeData' and dbId <> 0
I'm creating the TSQLQuery component on the fly and associating it to the
SQLConnection. Then when I open it I get the following error:
Project xxx raised exception class EDatabaseError with message 'Database
Server Error: SQL State: HY000, SQL Error Code: 0
Protocal error in TDS stream.
I've plugged the the above query into sql server management studio and it
works, and It also working in Data Explorer. Also if I drop a TSQLQuery
Component onto a datamodule and fill in the above query I can Set the state
to active without error at design time. But when I try to set it to active
at run time I get the error.
Any Ideas?
Thanks