Re: What to use for ADO parameter type and size



On all of this

(i) What database are you using?
(ii) What is the SQL command?

It maybe that SQL command could be optimised.

I endorse the parameterised query approach.
It really depends on how many you are going to execute.
If it is only a few, a Connection Execute is better (because of the extra
effort in setting up a Command object)
At some point, the initial overhead of setting up a Command object +
database is no longer reworking every time making a query plan starts to
overtake the simple approach.
I would interesting to find out what the crossover point is: 5? 15? 100?

At the moment in my own code, from about 6 years ago, I use RecordSets and
UpdateBatch to Insert records on SQL Server 2000 tables. This is because I
never found a faster approach.
Command objects were not faster. And BULK INSERT only works if the Server
has access to the drives where the text file is located.
But a remark by Bill Vaughn made me realise that Nagles Algorithm comes into
play and the slow down is the round trips to the Server in terms of network
packets.
It works out that you can send multiple INSERTs. So I will investigate this
at some point. Some rainy day.

Cheers

Stephen Howe





.



Relevant Pages

  • Re: Sharepoint Database falling over event 1000
    ... Microsoft Small Business Server Support ... > I Have Just run the SQL command from the command Line, ... > affected)1> exitDoes this say the database is Ok?If so why since we loaded ... > I/O operation has been aborted because ofeither a thread exit or an ...
    (microsoft.public.windows.server.sbs)
  • Re: NTDS ISAM DataBase Corruption
    ... Error on - ESENTUTL /g ... Wizard to force demotion in Windows Server 2003 and in Windows 2000 Server ... as it may not be the database that is the problem. ... Open a command prompt and run NTDSUTIL to verify the paths for the ...
    (microsoft.public.windows.server.active_directory)
  • Re: Exchange 2000 Event 704 Information Store 1760
    ... Dismount each store on this server. ... Open a command prompt, ... Select the first database on the list, ... Offline defrag will require a disk space location that can accommodate 110% ...
    (microsoft.public.exchange2000.information.store)
  • Re: How to retrieve database password
    ... Type the following command in the DOS prompt. ... Note Be sure to replace SERVERNAME with the name of your SQL server. ... The problem is the admin password for those database is ... > anyone know how to pull MSDE SQL database passwords without booting from ...
    (microsoft.public.sqlserver.msde)
  • Re: Sharepoint Application Error
    ... If it connects/logs in you should get a prompt that looks like 1> ... What messages do you get back from the above command? ... the default sts_config database exists. ... Check the database connection> information and make sure that the database server is> running". ...
    (microsoft.public.windows.server.sbs)