Re: ADO Recordset open problem IDispatch error #3121
- From: "Stephen Howe" <stephenPOINThoweATtns-globalPOINTcom>
- Date: Wed, 30 Nov 2005 18:49:26 -0000
> 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.
>
>
>
>
>
>
>
>
>
.
- Follow-Ups:
- Prev by Date: Re: Parameterized queries with where clause including 'in'
- Next by Date: ASP, ADO and Paging - Not Working
- Previous by thread: Re: Parameterized queries with where clause including 'in'
- Next by thread: Re: ADO Recordset open problem IDispatch error #3121
- Index(es):
Relevant Pages
|
|