Re: lengthy operation



Mike wrote:
Hi !

I am a beginner in ado programming and I have some problems with
operations on huge tables. I am developping with visual studio .NET
2003.

Why are you using classic ADO in .Net? Since you have VS 2003, go look in
the online help for tutorials about working with data.



Which command can I use to insert a record in table ? my problem is
when I open the recordset associated with the table (thousands of
records), it takes very long time. But I don't want to get all
records, I only want to add a new one.

Use a SQL INSERT statement executed by a Command object. Don't use a
recordset


I used the following code to open the recordset :
pRecordSet->Open("table", pConnection, true, adOpenKeyset,
adLockOptimistic, acCmdTable);


I have never used adCmdTable to open a recordset. I ALWAYS create a sql
select statement with a WHERE clause to limit the data retrieved from the
database.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


.



Relevant Pages

  • Re: Different results in SQL and Access
    ... do you mean using a recordset to loop through and select your ... Or do you mean using ADO to execute your sql queries (which would certainly ... This email account is my spam trap so I ...
    (microsoft.public.access.queries)
  • Re: Multiple Statements executed in a single step
    ... I have a classic ASP application with a development database in MS SQL ... I am trying to retrieve the 'RowsAffected' into a recordset and have ... "select @@rowcount as 'RowsAffected';" ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.db)
  • Re: Multiple Statements executed in a single step
    ... I have a classic ASP application with a development database in MS SQL ... I am trying to retrieve the 'RowsAffected' into a recordset and have ... "select @@rowcount as 'RowsAffected';" ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.db)
  • Re: lengthy operation
    ... I do not want to use the ADO .NET because I don't want to use the .NET ... Executing a sql insert statement is done pretty much the same ... If you MUST use a recordset to do this, then do not use adCmdTable: ... This email account is my spam trap so I ...
    (microsoft.public.data.ado)
  • Re: lengthy operation
    ... I do not want to use the ADO .NET because I don't want to use the .NET ... Executing a sql insert statement is done pretty much the same ... If you MUST use a recordset to do this, then do not use adCmdTable: ... This email account is my spam trap so I ...
    (microsoft.public.data.ado)