I have a problem that I am trying to solve. We have a huge product with a
whole lot of ASP and VB code. VB code is all ActiveX dlls which are used by
ASP app. When I attempt to add features or fix bugs, I like to execute the
dlls in debug so I can see what is going on. (Some folks in my org seem to
have this kinda wacky bias against debugging, as if *real* programmers
should not need a debugger. Whatever, it is the fastest way for me to get
the picture.)
This product uses a technique that is different than what I have done in my
projects in the past. If I needed to make a connection to the database, I
would make it, do my work, close it within the narrowest context I could.. a
single sub / function a single class or whatever. This product instead
passes an open connection from the ASP page to a dll. Then, within the dll,
the connection is passed all over the place to various procs.
When running compiled, the dlls run fine. When running in debug mode, when
attempting to use a connection, a runtime error 3001 "Arguments are of the
wrong type, are out of acceptable range, or are in conflict with one
another." The recommended procedure up to this point when having to debug is
to change the offending code to make a new connection to use off the
connection string of the offending object. Then before checking the code in,
change it all back. What a monumental waste of time. So I want to solve this
once and for all. (Then I will be a hero and other pathetic programmers like
me who need to debug will kiss my feet. Ha Ha)
Since the code I am running is fairly complicated, I created a simple app
with one asp page and one activex dll in order to reproduce the problem. The
problem was not reproducable by me. I am clearly missing the vein here.
Thoughts I have at this point:
- The version of ADODB.Connection whcih is instantiated in the ASP page is
different than the one in VB. In VB you tell the version you wish in
References. How do I force / know what version is being instantiated in ASP?
- Different auth methods may be being used. Could this impact?
Any other thoughts on what I can pursue to investigate this? I am going to
scream if I have to keep monkeying around with things other than the work I
am trying to get done.
Thanks
Stephanie 3 2500
On Thu, 21 Apr 2005 09:45:14 -0400, "Stephanie" <Iw*********@NoWay.com> wrote:
¤ I have a problem that I am trying to solve. We have a huge product with a
¤ whole lot of ASP and VB code. VB code is all ActiveX dlls which are used by
¤ ASP app. When I attempt to add features or fix bugs, I like to execute the
¤ dlls in debug so I can see what is going on. (Some folks in my org seem to
¤ have this kinda wacky bias against debugging, as if *real* programmers
¤ should not need a debugger. Whatever, it is the fastest way for me to get
¤ the picture.)
¤
¤ This product uses a technique that is different than what I have done in my
¤ projects in the past. If I needed to make a connection to the database, I
¤ would make it, do my work, close it within the narrowest context I could.. a
¤ single sub / function a single class or whatever. This product instead
¤ passes an open connection from the ASP page to a dll. Then, within the dll,
¤ the connection is passed all over the place to various procs.
¤
¤ When running compiled, the dlls run fine. When running in debug mode, when
¤ attempting to use a connection, a runtime error 3001 "Arguments are of the
¤ wrong type, are out of acceptable range, or are in conflict with one
¤ another." The recommended procedure up to this point when having to debug is
¤ to change the offending code to make a new connection to use off the
¤ connection string of the offending object. Then before checking the code in,
¤ change it all back. What a monumental waste of time. So I want to solve this
¤ once and for all. (Then I will be a hero and other pathetic programmers like
¤ me who need to debug will kiss my feet. Ha Ha)
¤
¤ Since the code I am running is fairly complicated, I created a simple app
¤ with one asp page and one activex dll in order to reproduce the problem. The
¤ problem was not reproducable by me. I am clearly missing the vein here.
¤
¤ Thoughts I have at this point:
¤
¤ - The version of ADODB.Connection whcih is instantiated in the ASP page is
¤ different than the one in VB. In VB you tell the version you wish in
¤ References. How do I force / know what version is being instantiated in ASP?
¤
¤ - Different auth methods may be being used. Could this impact?
¤
¤ Any other thoughts on what I can pursue to investigate this? I am going to
¤ scream if I have to keep monkeying around with things other than the work I
¤ am trying to get done.
How are you actually debugging the components? Are you using VB? ASP?
You have to be very careful about passing ADO Connection objects around. Connections don't marshal
properly across process boundaries so I'm going to assume that all components in the application run
under the same process.
You also have to keep in mind that ASP only understands the Variant data type, which can cause some
headaches when using Visual Basic components. Explicitly typed arguments must be declared ByVal at
the component level in order to be compatible with ASP.
Paul
~~~~
Microsoft MVP (Visual Basic)
"Paul Clement" <Us***********************@swspectrum.com> wrote in message
news:4b********************************@4ax.com... On Thu, 21 Apr 2005 09:45:14 -0400, "Stephanie" <Iw*********@NoWay.com> wrote:
¤ I have a problem that I am trying to solve. We have a huge product with a ¤ whole lot of ASP and VB code. VB code is all ActiveX dlls which are used by ¤ ASP app. When I attempt to add features or fix bugs, I like to execute the ¤ dlls in debug so I can see what is going on. (Some folks in my org seem to ¤ have this kinda wacky bias against debugging, as if *real* programmers ¤ should not need a debugger. Whatever, it is the fastest way for me to get ¤ the picture.) ¤ ¤ This product uses a technique that is different than what I have done in my ¤ projects in the past. If I needed to make a connection to the database, I ¤ would make it, do my work, close it within the narrowest context I could.. a ¤ single sub / function a single class or whatever. This product instead ¤ passes an open connection from the ASP page to a dll. Then, within the dll, ¤ the connection is passed all over the place to various procs. ¤ ¤ When running compiled, the dlls run fine. When running in debug mode, when ¤ attempting to use a connection, a runtime error 3001 "Arguments are of the ¤ wrong type, are out of acceptable range, or are in conflict with one ¤ another." The recommended procedure up to this point when having to debug is ¤ to change the offending code to make a new connection to use off the ¤ connection string of the offending object. Then before checking the code in, ¤ change it all back. What a monumental waste of time. So I want to solve this ¤ once and for all. (Then I will be a hero and other pathetic programmers like ¤ me who need to debug will kiss my feet. Ha Ha) ¤ ¤ Since the code I am running is fairly complicated, I created a simple app ¤ with one asp page and one activex dll in order to reproduce the problem. The ¤ problem was not reproducable by me. I am clearly missing the vein here. ¤ ¤ Thoughts I have at this point: ¤ ¤ - The version of ADODB.Connection whcih is instantiated in the ASP page is ¤ different than the one in VB. In VB you tell the version you wish in ¤ References. How do I force / know what version is being instantiated in ASP? ¤ ¤ - Different auth methods may be being used. Could this impact? ¤ ¤ Any other thoughts on what I can pursue to investigate this? I am going to ¤ scream if I have to keep monkeying around with things other than the work I ¤ am trying to get done.
How are you actually debugging the components? Are you using VB? ASP?
You have to be very careful about passing ADO Connection objects around. Connections don't marshal properly across process boundaries so I'm going to assume that all components in the application run under the same process.
You just nailed it. This is the problem. When VB is in debug the dlls are
not run under the same process. Thanks!
You also have to keep in mind that ASP only understands the Variant data type, which can cause some headaches when using Visual Basic components. Explicitly typed arguments must be declared ByVal at the component level in order to be compatible with ASP.
Paul ~~~~ Microsoft MVP (Visual Basic)
"Stephanie" <Iw*********@NoWay.com> wrote in message
news:OK**************@TK2MSFTNGP14.phx.gbl... "Paul Clement" <Us***********************@swspectrum.com> wrote in message news:4b********************************@4ax.com... On Thu, 21 Apr 2005 09:45:14 -0400, "Stephanie" <Iw*********@NoWay.com> wrote:
¤ I have a problem that I am trying to solve. We have a huge product
with a ¤ whole lot of ASP and VB code. VB code is all ActiveX dlls which are
used by ¤ ASP app. When I attempt to add features or fix bugs, I like to execute the ¤ dlls in debug so I can see what is going on. (Some folks in my org
seem to ¤ have this kinda wacky bias against debugging, as if *real* programmers ¤ should not need a debugger. Whatever, it is the fastest way for me to get ¤ the picture.) ¤ ¤ This product uses a technique that is different than what I have done
in my ¤ projects in the past. If I needed to make a connection to the
database, I ¤ would make it, do my work, close it within the narrowest context I could.. a ¤ single sub / function a single class or whatever. This product instead ¤ passes an open connection from the ASP page to a dll. Then, within the dll, ¤ the connection is passed all over the place to various procs. ¤ ¤ When running compiled, the dlls run fine. When running in debug mode, when ¤ attempting to use a connection, a runtime error 3001 "Arguments are of the ¤ wrong type, are out of acceptable range, or are in conflict with one ¤ another." The recommended procedure up to this point when having to debug is ¤ to change the offending code to make a new connection to use off the ¤ connection string of the offending object. Then before checking the
code in, ¤ change it all back. What a monumental waste of time. So I want to
solve this ¤ once and for all. (Then I will be a hero and other pathetic
programmers like ¤ me who need to debug will kiss my feet. Ha Ha) ¤ ¤ Since the code I am running is fairly complicated, I created a simple app ¤ with one asp page and one activex dll in order to reproduce the
problem. The ¤ problem was not reproducable by me. I am clearly missing the vein
here. ¤ ¤ Thoughts I have at this point: ¤ ¤ - The version of ADODB.Connection whcih is instantiated in the ASP
page is ¤ different than the one in VB. In VB you tell the version you wish in ¤ References. How do I force / know what version is being instantiated
in ASP? ¤ ¤ - Different auth methods may be being used. Could this impact? ¤ ¤ Any other thoughts on what I can pursue to investigate this? I am
going to ¤ scream if I have to keep monkeying around with things other than the work I ¤ am trying to get done.
How are you actually debugging the components? Are you using VB? ASP?
You have to be very careful about passing ADO Connection objects around. Connections don't marshal properly across process boundaries so I'm going to assume that all components in the application run under the same process.
You just nailed it. This is the problem. When VB is in debug the dlls are not run under the same process. Thanks!
If you have a windows debugger installed on the web-server ( I use the VC++
debugger ) you can debug the IIS process containing the application. We do
this all the time and, like your app, the dbconnection is typically passed
in from the ASP page so that it does not have to be created and opened
repeatedly on the same page.
1. reset iis
2. launch task manager and identify the instances of DLLHOST.
3. launch your ASP app. This should create a new instance of DLLHOST
4. right-click on the new instance of DLLHOST and select "debug"
5. when the debugger opens you can open the desired source file. You may
have to hit a page that uses your object before you are able to set a
breakpoint.
There are a few drawbacks to this method. The principal one is that the VC
debugger doesn't understand variant arrays well so you may have to add some
debugging variables inside of loops. Also, (this one is weird), parameters
passed in ByRef do not appear to change in the debugger. The values do
actually change but the debugger shows the original value (again
necessitating some additional local variables for debugging).
--
Mark Schupp
Head of Development
Integrity eLearning www.ielearning.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dmitry Akselrod |
last post by:
Hello everyone,
I have a vb.net application that wraps the TCPListener object
in a class. The server connects to the local interface and establishes
itself on port 9900. It then polls for...
|
by: Rohit Raghuwanshi |
last post by:
Hello all,
we are running a delphi application with DB2 V8.01 which is causing
deadlocks when rows are being inserted into a table. Attaching the
Event Monitor Log (DEADLOCKS WITH DETAILS) here....
|
by: Tom |
last post by:
I try to write a simple tcp based job queue server. It's purpose is to
get commands from a client and store them in a queue (STL). The server
has a thread which checks periodically the queue,...
|
by: Parasyke |
last post by:
I have a form that I choose from a list of database names and a list
within a textbox comes up with the computer ID number and an associated
(from a table) user name. Is there a way from looking at...
|
by: jayohare |
last post by:
Hello,
I have code within my DB application to process credit cards through
authorize.net. Ive been using the same code for several years without a
problem.
I have an order entry computer and...
|
by: b_r |
last post by:
Hi,
I'm trying to make a simple operation (insert into DB) in VB 2005 and
SQL Server.
The code is as follows:
Dim sConnectionString As String = _
"Data...
|
by: Arno R |
last post by:
Hi all,
I am sending mail from my apps with CDO nowadays.
However I have one client where this will not work until now.
I am thinking this is related to the provider where the client has his...
|
by: GaryDean |
last post by:
My ASP.Net application, that uses the SQL Membership Provider, runs fine on
my development box (server2003) as long as I use the standard provider.
But, in anticipation of deployment to other...
|
by: Robert Avery |
last post by:
In VBA/VB6, I had a class (incomplete sample below) that watched and
displayed for the user all connection events, so that I could easily
see what SQL was taking a long time, and when it freezes, I...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |