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!

Recordset Fields Not Updateable Problem

Status
Not open for further replies.

JTechMan

Programmer
Jun 15, 2009
23
CA
Hi All,

If someone could help me out here it would be great! I am doing some work moving an app from DB2 to SQL Server. Inside the app is a query such as this:

Code:
Select readcol1, realcol2, 0 as fictionalcol, 0 as fictionalcol from table where criteria = X

The issue is that DB2 did care about the fictious columns it seems while SQL Server does, it seems to know that they are not in the db table and renders them read only I think. I may be out to lunch.

Any guidance on whether this is true or not and a work around would be great!
 
This is not a SQL server issue as the query would execute fine within SQL.
SQL does not define the locking strategy for the data in this instance, it will return the data as requested, its more likely to be how you open your recordset or connectionstring.

Have a look at how you set up your connection in your app and this is likely to be the problem.



"I'm living so far beyond my income that we may almost be said to be living apart
 
Thanks for the hints! Although I believe it is how SQL returns the results that are causing the issue. I have had some small amount of luck with removing an order by clause though.

Thanks for the help!
 
Or maybe I am wrong, anyhoo, it is confusing as all get out...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top