Re: ado connection object in vb6



Wow, thank you for taking the time and giving detailed explanations. That
helps me. Your architecture is exactly how I have designed my application.
Up until the latest release where I added the connection within the exe,
there weren't many issues. Since users have been complaining and I have
verified slowdowns, it seemed like the best place to start was looking at
whether or not two ado connections objects would be the cause.

You seem to think two objects shouldn't matter, so there must be something
else. Needle meet haystack....

WB

"Ralph" <nt_consulting64@xxxxxxxxx> wrote in message
news:OUydgYupIHA.3804@xxxxxxxxxxxxxxxxxxxxxxx

"wb" <none> wrote in message news:uclYg7opIHA.2636@xxxxxxxxxxxxxxxxxxxxxxx
Ok, now I am confused. One person recommends local objects, you
recommend
global objects.....

The basic model that I have used inside the dll is that when I need to
access the database I create a string variable and write the SQL. Then I
use a local adodb.recordset object (lets call it objRS) and I code a line
objRS.Open ("SQL string", global ado.connection).

I populate the record data into the object I am dealing with, say a
customer, and then I close the recordset and set it to nothing

WB



While the information on connection objects and connection pooling is
useful
it doesn't answer your specific question. So let me revisit it ...

In this context ...
Main Executable
Creates a ADODB.Connection
Uses a Dll
Which creates an ADODB.Connection object
Should NOT have much effect on performance, especially if you are using
the
same Connection general parameters. (Data Source, authentication,
Properties, etc.)

Your performance issues are likely due to something else.

This is the normal architecture for your average client/server
application:

' So global spot
Public WithEvents adoCnn As ADODB.Connection
'
' Some init, load, main etc...
On Error Goto ...
' create the object
Set adoCnn = New ADODB.Connection
' open it creating your first authenticated connection
' test to make sure it valid etc.
adoCnn.Open( .... )
' note: Close doesn't really do all that much, it just releases the
connection
' back to the pool
adoCnn.Close
...
Elsewhere in your application where you go to use it...

Private Sub Command1_Click()
' setup any different cursors, locks you want etc.
adoCnn.PropertyX = adSomething
adoCnn.Open()
' or
adoCnn.Open( , adSomething, etc)
'or if using the same, just open it
adoCnn.Open

'Use the connection
dim rs as adodb.recordset:
Set rs = adoCnn.Execute()
...
rs.close: set rs = nothing
' When done close it
adoCnn.Close()
End Sub

Redo your application along these lines. This will remove any "Connection
Issues" you might be having. Then isolate those areas where you are
experiences performance issues and post back. People here can help with
those specific situation.

-ralph









.



Relevant Pages

  • Re: Re: are you interested, I mean, leading onto far nuts
    ... No petrols victoriously decline the qualified ... architecture. ... Are you innovative, I mean, ploting in connection with famous ...
    (sci.crypt)
  • worker but itchy morale
    ... Tell Elizabeth it's revolutionary shifting in connection with a ... If you'll allege Paulie's architecture with ... determine nervous and drowns our deaf, disturbing christmass ...
    (rec.music.christian)
  • Re: suggestions ?
    ... >> the architecture you are talking about is like a middle ware handeling ... distinguish what data is coming from whish server, ... >> the mechanism is something like buffereing data in the network stack as ... servers multiplexed into one TCP/IP connection)? ...
    (freebsd-hackers)
  • Re: ado connection object in vb6
    ... While the information on connection objects and connection pooling is useful ... Uses a Dll ... Public WithEvents adoCnn As ADODB.Connection ... adoCnn.Open(, adSomething, etc) ...
    (microsoft.public.vb.database.ado)
  • Re: em problems on supermicro 5015M-MT+
    ... On Friday 09 March 2007 13:42, Sven Petai wrote: ... I am not sure why the 32/64 bit architecture is making a difference, ... 32 bit box to other switch than the 64 bit boxes and it ... It was really just the connection between the switches that ...
    (freebsd-net)

Loading