473,387 Members | 1,497 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

use existing connection or create new

I'm wondering which is the best approach using an Access2K front end
and a SQL Server 2K backend.
I have a stored procedure running three INSERT INTO statements that
inserts records into three different tables.

Should I use the ADP project connection as set through the Access
Connection window:
Set cmd = New ADODB.Command
Set cmd.ActiveConnection = CurrentProject.Connection

Or, should I create a new connection, then execute the command, then
close the connection.

Does it make any difference at all?
Would it make a difference as far as minimizing blocking errors to do
it one way or the other?

Help is appreciated.
lq
Nov 12 '05 #1
1 2448
Lauren Quantrell wrote:
I'm wondering which is the best approach using an Access2K front end
and a SQL Server 2K backend.
I have a stored procedure running three INSERT INTO statements that
inserts records into three different tables.

Should I use the ADP project connection as set through the Access
Connection window:
Set cmd = New ADODB.Command
Set cmd.ActiveConnection = CurrentProject.Connection

Or, should I create a new connection, then execute the command, then
close the connection.

Does it make any difference at all?
Would it make a difference as far as minimizing blocking errors to do
it one way or the other?

Help is appreciated.
lq


I'd use one connection wrapped in a transaction, that way I can roll
back everything if one fails.

The only time I'd use another connection is to be outside of the
transaction, e.g for error logging purposes, I found out the hard way
that my error log got rolled back when I rolled back everything else.
--
But why is the Rum gone?
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Lauren Quantrell | last post by:
I'm wondering which is the best approach using an Access2K front end and a SQL Server 2K backend. I have a stored procedure running three INSERT INTO statements that inserts records into three...
0
by: Mike | last post by:
VB .NET 2003, Pocket PC 2003, CF 1.0 SP 2 Only when I use a proxy server, I'm getting this error when attempting to write data to a Stream object from an HTTPWebRequest object....
0
by: SisAndz | last post by:
Hello, I'm trying to do a secure connect to the site https://212.77.100.18/p/ with ..net 2.0 HttpWebRequest class, unfortunately for some reason I'm not able to do that - WebException is thrown...
2
by: Alan Mailer | last post by:
I'm sorry if this one has been asked and answered a million times: Is it possible to have a VB6 app alter the name of an *existing* field in Access 2002 database? To be clear, I'm not talking...
0
by: ricolee99 | last post by:
Hi Everyone, I'm using the System.IO.Ports.SerialPort component to attempt to kill an existing component opened by another application. I use the following code: SerialPort serialPort = new...
1
by: balaya | last post by:
was an error downloading 'https://pushmxtest.equitynational.com/EquityNational/PushMXService.svc/secure'. The underlying connection was closed: An unexpected error occurred on a receive. Unable...
4
by: Anbu | last post by:
Hi All, I'm using the Cassini component in my desktop application to create a web site to host the web services. The application works fine in normal scenario. If the system is kept idle for...
1
by: arcingmad | last post by:
Hi I am using the following code in a button click event to run a query stored in a .mdb file from an external geographic program ArcGIS via a jet adodb connection I have the need to run an...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.