Re: ADO Recordset open problem IDispatch error #3121



> 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: Migration ?
    ... I've tried every way I can think of trying to restore the master database. ... Will a restore on the SQL ... Install a SQL Server failover cluster instance ...
    (microsoft.public.sqlserver.clustering)
  • Re: dbdebunk Quote of Week comment
    ... > a lot of really bad SQL programmers. ... But SQL does not have a pointer data type or the ... > being told to design a database. ... But why is little Cindy Lou Who employee ...
    (comp.databases.theory)
  • Re: DBMS and lisp, etc.
    ... Naively implemented with SQL, again for 10 ... (1 query for the initial orders, 1 query for each order for its ... soon as you upgrade to the SQL database. ... (eq (order-customer orderA) ...
    (comp.lang.lisp)
  • Re: dbdebunk Quote of Week comment
    ... > a lot of really bad SQL programmers. ... a surrogate key should support the primary key. ... But SQL does not have a pointer data type or the ... > being told to design a database. ...
    (comp.databases.theory)
  • Re: dbdebunk Quote of Week comment
    ... But SQL does not have a pointer data type or the ... More and more programmers who have absolutely no database training are ... But why is little Cindy Lou Who employee ...
    (comp.databases.theory)