473,378 Members | 1,417 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,378 software developers and data experts.

problem creating com+ object using ASP

MG
Hello all,
Perhaps you can help me. I have a com object which I converted from VB6
to VB.NET. I am using this com object with other .Net applications
without any problem. However, I am now trying to use this com object in
some old ASP code which I have not yet converted. I want to use the com
object because it contains some additional functionallity that the
original com object did not possess. The ASP code works fine when
calling the old com object. BUT..if I change the code to call the new
com object, it takes a very very (60secs.) long time for the object to
be instantuated. In other words, when the code hits the CreateObject
line, it takes 60 secs to execute. The rest of the calls to the methods
of that com object execute normally. What am I doing wrong? I am
including code snipplets of both the VB.NET com object and the ASP
page.

Thank you in advance.

Michael Gisonda

VB.NET---------------------
Option Strict Off
Option Explicit On
Imports System.EnterpriseServices
Imports System.Reflection
Imports System.Runtime.InteropServices

<Assembly: AssemblyVersion("3.0.0.0")>
<Assembly: ComCompatibleVersionAttribute(1, 0, 0, 0)>
<Assembly: ApplicationName("EstSyspro_NET")>
<Assembly:
AssemblyKeyFileAttribute("N:\Projects\Estimpact.ne t\bin\EstSyspro.snk")>
<System.Runtime.InteropServices.ProgId("EstSyspro_ NET.Custinfo")>
Public Class Custinfo
Inherits ServicedComponent
Private gImpConn As ADODB.Connection
Private mConnection As Object

<AutoComplete()Public Function GetBlanketContractInfo(ByVal contract
As String, ByVal stockcode As String, Optional ByVal companyid As
String = "L") As ADODB.Recordset

Dim sSQL As String
Dim rsRetRecord As New ADODB.Recordset
Dim rsGetRec As New ADODB.Recordset
Dim lLocalConnection As New ADODB.Connection

'Take the company id provided by the user and make it
capitalized and only the first letter.
companyid = UCase(Trim(Mid(companyid, 1, 1)))

'Set the connection string to the proper company based on the
companyid
lLocalConnection.ConnectionString =
fnGetConnectionString(companyid)

'Open the connection.
lLocalConnection.Open()

sSQL = "SELECT SorContractPrice.ContractType,
SorContractPrice.StockCode, " & "SorContractPrice.Contract,
SorContractPrice.StartDate, " & "SorContractPrice.ExpiryDate,
SorContractPrice.PriceMethod," & "SorContractPrice.FixedUom,
SorContractPrice.FixedPriceCode, " & "SorContractPrice.FixedPrice " &
"FROM SorContractPrice " & "WHERE SorContractPrice.Contract= '" &
contract & "' " & "AND SorContractPrice.StockCode= '" & stockcode & "'"

rsGetRec = lLocalConnection.Execute(sSQL)

If Not rsGetRec.BOF And Not rsGetRec.EOF Then
rsRetRecord = MakeRS(rsGetRec)
OpenAndFillRS(rsGetRec, rsRetRecord)
Else
rsRetRecord = Nothing
End If

'Clean up
rsGetRec.Close()
rsGetRec = Nothing
lLocalConnection.Close()
lLocalConnection = Nothing

GetBlanketContractInfo = rsRetRecord

End Function
End Class

END VB.NET -----------------------------------------

Sep 27 '06 #1
0 937

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

Similar topics

6
by: Fnark! | last post by:
I am creating a shopping cart using PHP Version 4.1.2. I am creating and registering a cart object in a session. The cart object contains an array of arrays called $order whose elements are a...
2
by: Yves Touze | last post by:
Hi All, I'm trying to migrate from SQL Server 7.0 to SQL Server 2000. I've got some ASP page which call VB components that retrieve shaped recordsets from SQL Server using the MSDATASHAPE...
8
by: rawCoder | last post by:
Hi All, I need some advanced samples or references for passing custom objects over the network using sockets. Without using Remoting what are other options in .NET Framework for this binary...
2
by: Edward Diener | last post by:
In C++ an overridden virtual function in a derived class must have the exact same signature of the function which is overridden in the base class, except for the return type which may return a...
3
by: Ben Terry | last post by:
I have imported a legacy C++ project into a VisualStudio.NET 2003 solution. I have some new C# projects in the solution as well. I am using the managed extensions in my C++ project so that I can...
14
by: Venkat Chellam | last post by:
I have a peculiar problem. I have a simple web application which loads some data from the oracle table and display in the datagrid in the webpage and datagrid has page enabled which shows 10 rows...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
7
by: Nathan Sokalski | last post by:
I am having a problem saving an image with the same name it originally had. I have two similar versions of my code, one in which I close the FileStream used to open the original image before saving,...
6
by: TPJ | last post by:
Help me please, because I really don't get it. I think it's some stupid mistake I make, but I just can't find it. I have been thinking about it for three days so far and I still haven't found any...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.