Re: ADO Recordset open problem IDispatch error #3121



Hello Thank you for reply

I cannot just rename the old database to another name because
It is a production live database. It is not a option.



"Stephen Howe" wrote:

> > I seriously need help on this. Please take time listen to my problem.
> >
> > We have a SQL 2000 database running for a year. the main table called
> > 'datatable' has grown to 1.8GB. Now we want to change the old database
> name
> > to a different name without losing all the data in it.
>
> Right
>
> > We made full backup of the old database and create a new empty database
> and restore the old database to it.
>
> Why do this? Why not just rename the database?
> 1. Make sure no one is using the database .
> Make sure someone is logged in with role sysadmin or dbcreator
> 2. In Query Analyser execute
>
> sp_renamedb 'old_name' , 'new_name'
>
> replacing the quoted strings with the old and new names
>
> Stephen Howe
>
>
>
>
> >
> > After I done that the program that populates the "datatable" in the newly
> > restored database always give me error (IDispatch error #3121:
> > [Microsoft][ODBC SQL Server Driver]Timeout expired :Microsoft OLE DB
> > Provider for ODBC Drivers)
> > when rs->Open("DataTable", _variant_t((IDispatch *)conn,true),
> > adOpenKeyset, adLockOptimistic,adCmdTable); excuted.
> >
> > I have tried to recreate table index. It still doesn't work.
> > The datatable has first column "ID" as integer AutoNumber.
> >
> > If I truncate the table, the program works fine. If I delete most of the
> data
> > for example only keep last a few hundred rows, the program also works.
> > If I don't use rs->open and rs->addNew() method to insert data, instead of
> > using a simple insert SQL query, it works fine.
> >
> > I believe the problem is that when we do restore something got messed up,
> but
> > how? If the datatable is too big and need more time to process when we
> call
> > rs->open, but why the old database doesn't have this problem. The same
> > program are running on those two databases. Any ideas?
> >
> > Please help me out.
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
.



Relevant Pages

  • Re: Change Field Name in Table
    ... try to figure out the delete and/or renaming it again. ... table with the make Table query or even using the DoCmd Copy. ... move everything over to another database and use the new database. ... was Imported and you should be able to rename it. ...
    (microsoft.public.access.formscoding)
  • Re: Security Wizard
    ... you can't just rename/delete all existing mdw files. ... If you found system.mdw and renamed it, just rename it back to system.mdw and try and open Access. ... Accounts and Encrypt/Decrypt the database. ... Security Wizard at this time': ...
    (microsoft.public.access.gettingstarted)
  • Re: Constants for DB Fields in Front End a good idea?
    ... When a database entity changes, ... you get a runtime error that ... the DBA renamed FirstNM to FirstName. ... could care less if the DBA decides to rename column FName to FirstName ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: rename physical files?
    ... You can detach the database, move the physical files (and/or rename them) ... and then attach the database. ... File 'restoredb' does not exist. ...
    (microsoft.public.sqlserver.tools)
  • Re: Check Tables in Use
    ... If the database is split front end / back end I would just rename the tables ... and the second to delete (deleting is the easy part!) ... > error deleting any of them, roll back the transaction. ...
    (microsoft.public.access.formscoding)