This is a discussion on "ASP calling a DLL Problem!!" within the Classic ASP section. This forum, and the thread "ASP calling a DLL Problem!! are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
ASP calling a DLL Problem!!
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
ASP calling a DLL Problem!!
Hello,
I'm fairly new to ASP.. I'm trying to call a DLL witten in VB [in winnt\system32] which accesses an Oracle database. The DLL has worked fine for many years when accessed by VB front-end apps. However, when making a call from ASP [using VBScript], my web page just seems to hang. Here's the ASP code which calls the DLL: set objADODb = Server.CreateObject("AAH_ADO2.CADODatabase") set objADOEng = Server.CreateObject("AAH_ADO2.CADOEngine") dim dbEng dim dbMain set dbEng = objADOEng set dbMain = objADODb dbEng.Initialise If dbEng.CMOpenDBClientCursor(9, 0, 3, "") = 0 Then Set dbMain = dbEng.GetDatabase(9) End If ....It's the call to CMOpenDBClientCursor which seems to be hanging.. this function simply creates a connection object for an oracle db. I can connect to the db directly within ASP using the ADO Connection stuff. Any ideas would be appreciated... |
|
|
|
#2
|
||||
|
||||
|
Hi Jason.... without actually seeing the VB object source, it would be pretty hard for me to
take a stab at what is wrong here. I can see that you have a little more code than nessessary, although cant see that would cause this error... you could try this:-
Let us know how you get on. Rob
__________________
Click the 'Thanks!' button if this post has helped you Rob - Webforumz Founder
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
#3
|
|||
|
|||
|
If dbEng.CMOpenDBClientCursor(9, 0, 3, "") = 0 Then
...its a golden rule of ASP not to use magic numbers! |
|
#4
|
|||
|
|||
|
<blockquote id="quote" class="ffs">quote:<hr height="1" noshade="noshade" id="quote" />Originally posted by Rob
Hi Jason.... without actually seeing the VB object source, it would be pretty hard for me to take a stab at what is wrong here. I can see that you have a little more code than nessessary, although cant see that would cause this error... you could try this:-
Let us know how you get on. Rob<hr height="1" noshade="noshade" id="quote" /></blockquote id="quote"> |
|
#5
|
||||
|
||||
|
Hi Jason.....
Could you not use a table of constants, instead of those mysterious numbers in function calls? It would be a nightmare for other developers to pick up your code otherwise.... it would also make your life easier. I presume those numbers roughly map to ADO constants such as adOpenStatic etc, etc
__________________
Click the 'Thanks!' button if this post has helped you Rob - Webforumz Founder
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
#6
|
|||
|
|||
|
Sorry... it was just a frig in the ASP...
The call in the ASP should read:
Jason <blockquote id="quote" class="ffs">quote:<hr height="1" noshade="noshade" id="quote" />Originally posted by Rob Hi Jason..... Could you not use a table of constants, instead of those mysterious numbers in function calls? It would be a nightmare for other developers to pick up your code otherwise.... it would also make your life easier. I presume those numbers roughly map to ADO constants such as adOpenStatic etc, etc<hr height="1" noshade="noshade" id="quote" /></blockquote id="quote"> |
![]() |
| Tags |
| asp, calling, dll, problem |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problem calling function via onClick | Eagle | JavaScript Forum | 5 | Jan 15th, 2007 21:41 |
| Calling all CSS guru's! | csa | Web Page Design | 6 | Mar 8th, 2006 08:28 |
| calling .exe | benbacardi | Flash & Multimedia Forum | 4 | Dec 19th, 2004 16:45 |