Click here to Skip to main content
16,005,473 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Data command problem vb6 Pin
Christian Graus27-Sep-06 19:48
protectorChristian Graus27-Sep-06 19:48 
GeneralRe: Data command problem vb6 Pin
Christian Graus27-Sep-06 21:14
protectorChristian Graus27-Sep-06 21:14 
GeneralRe: Data command problem vb6 Pin
Christian Graus27-Sep-06 22:05
protectorChristian Graus27-Sep-06 22:05 
GeneralRe: Data command problem vb6 Pin
Christian Graus27-Sep-06 23:27
protectorChristian Graus27-Sep-06 23:27 
AnswerRe: y cant add parameter in data enviroment command??? Pin
Christian Graus27-Sep-06 16:35
protectorChristian Graus27-Sep-06 16:35 
GeneralRe: y cant add parameter in data enviroment command??? Pin
Christian Graus27-Sep-06 17:51
protectorChristian Graus27-Sep-06 17:51 
GeneralRe: y cant add parameter in data enviroment command??? Pin
Christian Graus27-Sep-06 18:27
protectorChristian Graus27-Sep-06 18:27 
Questionproblem accessing com+ object using ASP. Pin
ntwlord27-Sep-06 9:35
ntwlord27-Sep-06 9:35 
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)="">
<assembly: applicationname("estsyspro_net")="">
<assembly: assemblykeyfileattribute("n:\projects\estimpact.net\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 -----------------------------------------

ASP Code -------------------------------------------

if mcountrycd="001" then
mCountryLbl="L"
else
mCountryLbl="M"
end if
'vvv This line takes 60 secs to execute.
Set IMPC = server.createobject("EstSyspro_NET.CustInfo")
'vvv This line executes normally.
Set IMPCUST = IMPC.GetBlanketCustInfo(Trim(mSysproCustomer),mCountryLbl)

if IMPCUST is nothing then

......
.....


End ASP Code ---------------------------------------
AnswerRe: problem accessing com+ object using ASP. Pin
Dave Kreskowiak27-Sep-06 12:54
mveDave Kreskowiak27-Sep-06 12:54 
GeneralRe: problem accessing com+ object using ASP. Pin
ntwlord29-Sep-06 8:12
ntwlord29-Sep-06 8:12 
Question[.net] Rich Text Box Font Size Pin
bamnet27-Sep-06 9:30
bamnet27-Sep-06 9:30 
AnswerRe: [.net] Rich Text Box Font Size Pin
EvoFreak27-Sep-06 9:57
EvoFreak27-Sep-06 9:57 
GeneralRe: [.net] Rich Text Box Font Size Pin
bamnet27-Sep-06 10:11
bamnet27-Sep-06 10:11 
GeneralRe: [.net] Rich Text Box Font Size Pin
[Marc]27-Sep-06 12:25
[Marc]27-Sep-06 12:25 
GeneralRe: [.net] Rich Text Box Font Size Pin
bamnet27-Sep-06 12:46
bamnet27-Sep-06 12:46 
GeneralRe: [.net] Rich Text Box Font Size Pin
Dave Kreskowiak27-Sep-06 12:59
mveDave Kreskowiak27-Sep-06 12:59 
GeneralRe: [.net] Rich Text Box Font Size Pin
[Marc]27-Sep-06 12:59
[Marc]27-Sep-06 12:59 
GeneralRe: [.net] Rich Text Box Font Size Pin
Dave Kreskowiak27-Sep-06 13:41
mveDave Kreskowiak27-Sep-06 13:41 
GeneralRe: [.net] Rich Text Box Font Size Pin
bamnet27-Sep-06 14:53
bamnet27-Sep-06 14:53 
GeneralRe: [.net] Rich Text Box Font Size Pin
Dave Kreskowiak27-Sep-06 17:26
mveDave Kreskowiak27-Sep-06 17:26 
QuestionChange backcolor of column in datagridview Pin
rajkaty27-Sep-06 5:40
rajkaty27-Sep-06 5:40 
AnswerRe: Change backcolor of column in datagridview Pin
Dave Kreskowiak27-Sep-06 8:36
mveDave Kreskowiak27-Sep-06 8:36 
GeneralRe: Change backcolor of column in datagridview Pin
rajkaty28-Sep-06 9:43
rajkaty28-Sep-06 9:43 
GeneralRe: Change backcolor of column in datagridview Pin
Dave Kreskowiak28-Sep-06 14:46
mveDave Kreskowiak28-Sep-06 14:46 
QuestionDataGridView Scrolling Pin
Are Jay27-Sep-06 4:32
Are Jay27-Sep-06 4:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.