
Changing values in a recordset
Brad,
why don't you let access do the sort for you as in the example below.
SELECT Format([EmployeeID],"0000") AS Expr1
FROM Employees
ORDER BY Format([EmployeeID],"0000");
Also, why can't you change the recordset data? Is the mdb file read only;
have you got the correct privilges; has the recordset been created as a read
only recordset; is it created out of a join across muliple tables?
Liam http://www.vbexpress.com
Quote:
> Hi there,
> I'm using VB5 and DAO.
> I have a recordset (pretty sure it's dynaset) full of integer values
> that are sorted (via Order By). Well, I want to be able to change a few
> of those values but it keeps saying "database or object is read-only".
> So even if I don't ever plan on modifying the .mdb file, I still can't
> change thsoe values? Rats! The deal is, they are sorted "wrong" for my
> purposes. I need them to be sorted as if they were strings (e.g.
> 1,10,11,2,3,4). So I thought I'd just put them in a string array, do a
> string sort and put their numeric values back into the recordset. Any
> way to do this??? Since I can't modify the .mdb I guess I'll have to
> create another temporary one or something.
> Thanks!
> Brad Stone
> The Salinon Corp.