Hi,
I think what happens in your case is that your recordset was updated already
and your code tries to call Update or CancelUpdate method again, which is
not allowed after updates completed. Hard to say where it happens and only
way to find it out is to debug your code. It could be in case if you call
AddNew, updated values and moved pointer inside of the recordset into
another location. In this case ADO will automatically update recordset and
exit from the edit mode
"Douglas J. Steele" <NOSPAM_djsteele.DeleteThis@NOSPAM_canada.com> 写入消息新闻
:ORZra621DHA.3496@TK2MSFTNGP11.phx.gbl...
> The DSNs are simply entries in the registy. The System DSNs are stored
> uinder HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI, while the User DSNs are
> stored under HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI
>
> Just get some code to read the registry, and you should be all set.
>
> --
> Doug Steele, Microsoft Access MVP
<font color=purple> > <a style='text-decoration: underline;' href="http://I.Am/DougSteele</font" target="_blank">http://I.Am/DougSteele</font</a>>
> (No private e-mails, please)
>
>
>
> "Peter Newman" <anonymous.DeleteThis@discussions.microsoft.com> wrote in message
> news:061101c3d764$a0442db0$a401280a@phx.gbl...
> > i have a VB6 ( SP5) project that is using one of two
> > systen DSN to connect to either a live SQl2000 server or
> > a devolopment one. The user selects the desired DSN when
> > starting the system. One of the problems i have is i
> > need to find out the SQL Server name associated with the
> > DSN being used.
> >
> > Can anyone help
>
><!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: System DSN