Re: Error on DBI



Do you use the same username and password to connect? Perhaps the DB permissions do not allow the user account rpt_preview.plx uses to access that column or table.

From my experience, DBI never falsely reports errors. The structure of your error message ([vendor][driver][server]message) is typical for ODBC, it is NOT generated by DBI.

Copy and paste the SQL statement from rpt_preview.plx into an SQL query tool, and use the username and password from rpt_preview.plx to login.

Alexander


On 17.04.2006 05:11, Raymond Wong wrote:

Hi Alexander,

Thanks for your reply. We have checked the table and DISP_MODFY_DT does
exist. In fact, when we re run the query using DBI or through query
analyzer, the query can return data. This is an intermittent problem
which makes the troubleshooting much more challenging. From your
experience, could this be a problem with DBI reporting false error? Or
could it be an intermittent problem over on the Database side? If that's
the case, could you send us an debug module so that we can capture more
clearly the state of the Database when this problem re-occurs?

Thanks a lot for your help.

-----Original Message-----
From: Alexander Foken [mailto:alexander@xxxxxxxx] Sent: Thursday, April 13, 2006 6:29 PM
To: Raymond Wong
Cc: dbi-users@xxxxxxxx; Tricia Koh
Subject: Re: Error on DBI

Your SQL statement in
d:\inetpub\wwwroot\S_script\Qdr\Reports\rpt_preview.plx line 99 contains
the column name "DISP_MODFY_DT" that does not exist in your database.
This is not a DBI problem, DBI is just reporting it. It is a problem
with your SQL statement, your Database and perhaps your connect string.

Alexander

On 13.04.2006 12:11, Raymond Wong wrote:



Hi,

I encountered this intermittent server error which I had been trying to





resolved :

*** 'd:\inetpub\wwwroot\S_script\Qdr\Reports\rpt_preview.plx' error message at: 2006/04/12 21:08:23 DBD::ODBC::st execute failed: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'DISP_MODFY_DT'. (SQL-S0022) [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'DISP_MODFY_DT'. (SQL-S0022) [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared. (SQL-37000)(DBD: st_execute/SQLExecute err=-1) at d:\inetpub\wwwroot\S_script\Qdr\Reports\rpt_preview.plx line 99.
Unable to execute the SQL statement. Affected Item: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'DISP_MODFY_DT'. (SQL-S0022) [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'DISP_MODFY_DT'. (SQL-S0022) [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared. (SQL-37000)(DBD: st_execute/SQLExecute err=-1)

This is an SQL query. When I tried to run the query shown in the error log, it works. The DB is Microsoft SQL 2000. May I know if anyone has encountered this error and share with me what is wrong with the above?
I've tried debugging using DBI trace but its provide the same error message as the server. I've also approached my DB administrator for help, but it could be application problem. Is it the application problem or DB problem?








--
Alexander Foken
mailto:alexander@xxxxxxxx http://www.foken.de/alexander/





--
Alexander Foken
mailto:alexander@xxxxxxxx http://www.foken.de/alexander/

.



Relevant Pages

  • RE: Error on DBI
    ... when we re run the query using DBI or through query ... could this be a problem with DBI reporting false error? ... could it be an intermittent problem over on the Database side? ... with your SQL statement, your Database and perhaps your connect string. ...
    (perl.dbi.users)
  • RE: (Fwd) suggestion for DBI
    ... I would like to suggest a new feature/function in DBI. ... be nice if there was a way to print out the actual sql statement for ... you will need to make a small fix to DBI to get Username and ParamArrays out. ...
    (perl.dbi.users)
  • Re: Error using " in .open with ADODB.Recordset
    ... recordset but I'm getting hung up on the SQL statement. ... query that has a string as a condition. ... Dim mrk As String ...
    (microsoft.public.data.ado)
  • Re: expiration
    ... First what type of field are you applying the criteria against? ... You can try the following in a query. ... If you are trying to get just records with the License has expired within ... it is the actual SQL statement that is executed. ...
    (microsoft.public.access.queries)
  • Re: Same date range in main and sub form
    ... You need to concatenate together the parts to make up the SQL string ... it will look like the SQL statement you original ... Allen Browne - Microsoft MVP. ... well as the name of the query on which the form is based. ...
    (microsoft.public.access.forms)