Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Access Error 1

Status
Not open for further replies.

ttrinh

MIS
Joined
Jan 21, 2002
Messages
93
Location
AU
Hi
I am trying to run an application that is currently in production. There are a few bugs in it so I have made a copy of the files that are in production onto my non production machine so I can work on them. I did not write the origninal code. When I run the application I get the following error and I'm not sure why.

Data Access Error
Unknown Data Access Error.
SQL = "select * from bin where binid = 164"
Data Source = "BINS"
The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (424:5) to (426:40).

I am lost as to why the application can't run as it is obviously still running from that code in production.
I think the error might be generated from the binTX.cfm file which contains all the userdefined tags.
The line that the error is referring to is:
<cfquery name=&quot;caller.#attributes.txName#&quot;
datasource=&quot;#application.DS#&quot;
dbType=&quot;#application.DB#&quot;>
select * from bin where binid = #attributes.txID#
</cfquery>
So in short I don't know where to start looking for the error.
Am I missing something?
Can anyone help?
I am new to CF so if I'm missing any relevant info plz let me know
Thanks
 
What database are you using? Can you run a query against the DB outside of cold fusion? (e.g use Query Analyzer for SQL Server or SQL Plus for oracle)

If you get the same error outside of CF (or similar error) then we'd know the source was the DB. Maybe the DBA changed the rights for the user or something like that?

 
The database is in Oracle81 and yes I can run queries on the database outside of ColdFusion. I use SQLPlus and it works fine. I am truly stuck and been staring at this error msg for days. I was wondering maybe there is something I need to add in to the server or something. I can run other stuff I have written in ColdFusion on the database. Any other ideas u can think of ?
Thanks for replying
 
Okay, since it is running fine in production and you can run the same sql in SqlPlus, then my first guess would be to look at the drivers on your system. Are you using ODBC drivers? Check the production system for the version of drivers that they are using and make sure they are the same.

If you are using native, then, would it be the tnsnames.ora file is not configured correctly? On your system, maybe go into CF admin and verify your datasource and make sure it is set up correctly.

HTH,
Tim P.
 
I have tried replicating the pages on my CFAdministrator server to match those on the production server but I still get the same error msg although something did happen. The page I tried to run consists of 3 templates, one of which displayed. The other 2 templated required database access( a binID to be passed to it ). So what I got was an error msg with the bottom template displayed correctly. The bottom template was justa simple output. Is this usual behaviour of CFserver ? Or does it mean I have a database prob? I have verified my connection with sample pages and they all can access the database

ttrinh
 
Hi TimP
It worked!!!It worked !!: )
Thanks for all ur help
U were right I checked the version of the ODBC driver on the production system and it was different to mine and after installing and verifying with the correct driver I can run the production code now
Thanks heaps!!!
 
No problem -- Looks like you did all the work, I'm glad to see you're up and running.

Tim P.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top