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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DATAWINDOW ISSUE WITH SQL SERVER VIEW IN ORACLE

Status
Not open for further replies.

etownsend

Programmer
Jan 22, 2004
2
US
I am using the following SQL statement in my datawindow:

Select "MerrickID",
"API",
"AccountingID",
"WellName",
"Operator",
"ProducingWellStatus",
"SpudDate",
"CompletionDate",
"DateOfInitialProductionOil",
"StateName",
"CountyName",
"Township",
"Range",
"Section",
"FormationName",
"Field",
"LeaseName",
"TotalWorkingInterest",
"TotalNetRevenueInterest",
"DateAbandoned"
From MERRICKDATA
where "MerrickID" = 1;

I am connected to an Oracle database that has a public synonym (MERRICKDATA) that accesses a SQL SERVER view through a database link. This statement works when I run it in the Oracle database, but does not work when I run it in PowerBuilder.

It will work in PowerBuilder when I have the where statement = 'rownum = 1' but not when I have it = '"MerrickID" = 1'.

I get the following error in the datawindow when I run it through PowerBuilder:
Select Error: ORA-01002: fetch out of sequence
ORA-02063: preceding line from MSQL

Thanks for any help that you can provide.
I would greatly appreciate it!


 
Does the MERRICKDATA table have a primary key? If not, try adding a primary key to the table and try it again. I'm just guessing but, I have seen stuff like this before using odbc drivers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top