Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 not updatable recordset

Author  Topic 

Stalknecht
Starting Member

22 Posts

Posted - 2003-08-20 : 09:06:17
My problem is that when Functions are used in SQL 2000 Stored Procedures(like convert), that column is not updatable in my ado disconnected recordset. Who knows why?

Frank Kalis
Constraint Violating Yak Guru

413 Posts

Posted - 2003-08-20 : 09:40:33
Can you post some sample code?

Cheers,
Frank
Go to Top of Page

Stalknecht
Starting Member

22 Posts

Posted - 2003-08-20 : 09:52:40
[code]
create procedure spMyProc
AS
SELECT
CONVERT(VARCHAR,Table.Field) as Example
FROM
Table
Go
[/code]
When i get this disconnected recordset in vb6.0 with ADO then the example column is not updatable. When i put this convert statement in a view and create an sp who's select * from this view the column is updatable.
This is a workaround but is there another solution
extra information:
The recordset is only for presentation of the data.
The problem field is an unix-time field in the database of type Integer and i must change it into a readable string.
Go to Top of Page

Frank Kalis
Constraint Violating Yak Guru

413 Posts

Posted - 2003-08-21 : 03:43:54
Well, not that I know a solution to your problem, so consider this just as a wild guess !
Are you updating the data in the underlying format or in the converted format?

Cheers,
Frank
Go to Top of Page

Stalknecht
Starting Member

22 Posts

Posted - 2003-08-21 : 04:14:06
[code]CREATE VIEW vwTest
AS
SELECT
CONVERT(VARCHAR,MyTable.z_nr_createdate) As 'Date'
FROM
MyTable
GROUP BY
z_nr_createdate

GO

CREATE procedure spLcSelecties
as
SELECT
*
FROM
vwTest
GO[/code]

(In vb i call the sp with ado as an disconnected recordset for presentation purposal so i try to edit the converted format)
This is the workaround but i have to get rid of the group by in the real query. If i do that the column is again not updatable
Who?
Go to Top of Page
   

- Advertisement -