Re: ADO Recordset open problem IDispatch error #3121
- From: Zzz <Zzz@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 1 Dec 2005 11:02:02 -0800
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.
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
.
- References:
- Re: ADO Recordset open problem IDispatch error #3121
- From: Stephen Howe
- Re: ADO Recordset open problem IDispatch error #3121
- Prev by Date: Re: How can i keep an ado connection alive?
- Next by Date: how to connect to remote computer?
- Previous by thread: Re: ADO Recordset open problem IDispatch error #3121
- Next by thread: ASP, ADO and Paging - Not Working
- Index(es):
Relevant Pages
|
|