Discussion:
Deploying COM+ server apps on clustered server....
Mark Nicholls
2003-04-09 09:18:14 UTC
Permalink
I have developed a system that has run quite happily for a year or so.

It consists of two COM+ application servers and two COM+ applicaton
libraries.

The clients access one of the COM+ servers in the normal manner.

All interfaces are stateless.

The system accesses a MS SQL 2000 database.

The client now wants to deploy the system (both COM+ and SQL) on a
clustered server.

Will it just work ?

I have no experience of clustered systems at all and can only find passing
references to it in documentation.

You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
Salai Sivadhanam
2003-04-24 04:42:34 UTC
Permalink
Hi Friends....

I am having one problem.... I want to log the line number where error
occurs, in my VB code.... Will anyone suggest me how can I find the line
number in runtime automatically....? Is there any command, or method to get
the line number in runtime....?

Help Pls....

Salai

You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
Randell, Brian
2003-04-24 04:57:14 UTC
Permalink
Use Erl. You will need to add the line numbers to your source code for this to work.

Cheers,

Brian Randell
DevelopMentor

-----Original Message-----
From: Salai Sivadhanam [mailto:***@LGSOFTINDIA.COM]
Sent: Wed 4/23/2003 9:42 PM
To: ***@DISCUSS.DEVELOP.COM
Cc:
Subject: [VBCOM] How to get line number in VB in runtime....



Hi Friends....

I am having one problem.... I want to log the line number where error
occurs, in my VB code.... Will anyone suggest me how can I find the line
number in runtime automatically....? Is there any command, or method to get
the line number in runtime....?

Help Pls....

Salai

You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http
Salai Sivadhanam
2003-04-24 06:32:53 UTC
Permalink
Thanx Randell...

But, will U pls tell me how to include line numbers automatically in the old files, developed in VB 6.0....?

Salai


-----Original Message-----
From: Technical discussion of VBCOM [mailto:***@DISCUSS.DEVELOP.COM]On Behalf Of Randell, Brian
Sent: Thursday, April 24, 2003 10:27 AM
To: ***@DISCUSS.DEVELOP.COM
Subject: Re: [VBCOM] How to get line number in VB in runtime....

Use Erl. You will need to add the line numbers to your source code for this to work.

Cheers,

Brian Randell
DevelopMentor

-----Original Message-----
From: Salai Sivadhanam [mailto:***@LGSOFTINDIA.COM]
Sent: Wed 4/23/2003 9:42 PM
To: ***@DISCUSS.DEVELOP.COM
Cc:
Subject: [VBCOM] How to get line number in VB in runtime....



Hi Friends....

I am having one problem.... I want to log the line number where error
occurs, in my VB code.... Will anyone suggest me how can I find the line
number in runtime automatically....? Is there any command, or method to get
the line number in runtime....?

Help Pls....

Salai

You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.


You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
Mark Burns
2003-04-24 12:58:56 UTC
Permalink
Salai,

You don't get line numbers automatically in VB6 - old files or new.
Line numbers or line labels MUST be inserted into the source code
manually.

Now, that said, you could write some code to put line numbers into your
old source code files...
Open them as ASCII text files, change the buffer - inserting a line
number and a colon(:), (unless the line has a colon not within quotes in
it already), and write it back out again to a new source text file.
Repeat, incrementing the line number each time (I'd recommend increments
of 10, at least, but 100 would be better), until the end of the source
file is reached.

Regards,
Mark
Post by Randell, Brian
-----Original Message-----
On
Post by Randell, Brian
Behalf Of Salai Sivadhanam
Sent: Thursday, April 24, 2003 2:33 AM
Subject: Re: [VBCOM] How to get line number in VB in runtime....
Thanx Randell...
But, will U pls tell me how to include line numbers automatically in
the
Post by Randell, Brian
old files, developed in VB 6.0....?
Salai
-----Original Message-----
From: Technical discussion of VBCOM
Behalf Of Randell, Brian
Sent: Thursday, April 24, 2003 10:27 AM
Subject: Re: [VBCOM] How to get line number in VB in runtime....
Use Erl. You will need to add the line numbers to your source code for this to work.
Cheers,
Brian Randell
DevelopMentor
-----Original Message-----
Sent: Wed 4/23/2003 9:42 PM
Subject: [VBCOM] How to get line number in VB in runtime....
Hi Friends....
I am having one problem.... I want to log the line number
where
Post by Randell, Brian
error
occurs, in my VB code.... Will anyone suggest me how can I
find
Post by Randell, Brian
the line
number in runtime automatically....? Is there any command, or method to get
the line number in runtime....?
Help Pls....
Salai
You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at
http://discuss.develop.com.
You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
Mitch Gordon
2003-04-24 13:56:58 UTC
Permalink
Try the VB plug-in at www.mztools.com . It's free and includes several
useful tools including line numbering.

Mitch Gordon
Transportation Solutions, Inc.
***@trans-2000.com
Cell: (770) 548-7109


-----Original Message-----
From: Technical discussion of VBCOM [mailto:***@DISCUSS.DEVELOP.COM]
On Behalf Of Mark Burns
Sent: Thursday, April 24, 2003 8:59 AM
To: ***@DISCUSS.DEVELOP.COM
Subject: Re: [VBCOM] How to get line number in VB in runtime....


Salai,

You don't get line numbers automatically in VB6 - old files or new. Line
numbers or line labels MUST be inserted into the source code manually.

Now, that said, you could write some code to put line numbers into your
old source code files... Open them as ASCII text files, change the
buffer - inserting a line number and a colon(:), (unless the line has a
colon not within quotes in it already), and write it back out again to a
new source text file. Repeat, incrementing the line number each time
(I'd recommend increments of 10, at least, but 100 would be better),
until the end of the source file is reached.

Regards,
Mark
Post by Randell, Brian
-----Original Message-----
On
Post by Randell, Brian
Behalf Of Salai Sivadhanam
Sent: Thursday, April 24, 2003 2:33 AM
Subject: Re: [VBCOM] How to get line number in VB in runtime....
Thanx Randell...
But, will U pls tell me how to include line numbers automatically in
the
Post by Randell, Brian
old files, developed in VB 6.0....?
Salai
-----Original Message-----
From: Technical discussion of VBCOM
Behalf Of Randell, Brian
Sent: Thursday, April 24, 2003 10:27 AM
Subject: Re: [VBCOM] How to get line number in VB in runtime....
Use Erl. You will need to add the line numbers to your source code for
this to work.
Cheers,
Brian Randell
DevelopMentor
-----Original Message-----
Sent: Wed 4/23/2003 9:42 PM
Subject: [VBCOM] How to get line number in VB in runtime....
Hi Friends....
I am having one problem.... I want to log the line number
where
Post by Randell, Brian
error
occurs, in my VB code.... Will anyone suggest me how can I
find
Post by Randell, Brian
the line
number in runtime automatically....? Is there any command, or
method to get
the line number in runtime....?
Help Pls....
Salai
You can read messages from the VBCOM archive, unsubscribe from
VBCOM, or
subscribe to other DevelopMentor lists at
http://discuss.develop.com.
You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
Salai Sivadhanam
2003-04-25 07:17:46 UTC
Permalink
Oh.... Thanx Mitch.... It's working fine.... Really, that's a useful
tool....

Salai


-----Original Message-----
From: Technical discussion of VBCOM [mailto:***@DISCUSS.DEVELOP.COM]On
Behalf Of Mitch Gordon
Sent: Thursday, April 24, 2003 7:27 PM
To: ***@DISCUSS.DEVELOP.COM
Subject: Re: [VBCOM] How to get line number in VB in runtime....

Try the VB plug-in at www.mztools.com . It's free and includes several
useful tools including line numbering.

Mitch Gordon
Transportation Solutions, Inc.
***@trans-2000.com
Cell: (770) 548-7109


-----Original Message-----
From: Technical discussion of VBCOM [mailto:***@DISCUSS.DEVELOP.COM]
On Behalf Of Mark Burns
Sent: Thursday, April 24, 2003 8:59 AM
To: ***@DISCUSS.DEVELOP.COM
Subject: Re: [VBCOM] How to get line number in VB in runtime....


Salai,

You don't get line numbers automatically in VB6 - old files or new. Line
numbers or line labels MUST be inserted into the source code manually.

Now, that said, you could write some code to put line numbers into your
old source code files... Open them as ASCII text files, change the
buffer - inserting a line number and a colon(:), (unless the line has a
colon not within quotes in it already), and write it back out again to a
new source text file. Repeat, incrementing the line number each time
(I'd recommend increments of 10, at least, but 100 would be better),
until the end of the source file is reached.

Regards,
Mark
Post by Randell, Brian
-----Original Message-----
On
Post by Randell, Brian
Behalf Of Salai Sivadhanam
Sent: Thursday, April 24, 2003 2:33 AM
Subject: Re: [VBCOM] How to get line number in VB in runtime....
Thanx Randell...
But, will U pls tell me how to include line numbers automatically in
the
Post by Randell, Brian
old files, developed in VB 6.0....?
Salai
-----Original Message-----
From: Technical discussion of VBCOM
Behalf Of Randell, Brian
Sent: Thursday, April 24, 2003 10:27 AM
Subject: Re: [VBCOM] How to get line number in VB in runtime....
Use Erl. You will need to add the line numbers to your source code for
this to work.
Cheers,
Brian Randell
DevelopMentor
-----Original Message-----
Sent: Wed 4/23/2003 9:42 PM
Subject: [VBCOM] How to get line number in VB in runtime....
Hi Friends....
I am having one problem.... I want to log the line number
where
Post by Randell, Brian
error
occurs, in my VB code.... Will anyone suggest me how can I
find
Post by Randell, Brian
the line
number in runtime automatically....? Is there any command, or
method to get
the line number in runtime....?
Help Pls....
Salai
You can read messages from the VBCOM archive, unsubscribe from
VBCOM, or
subscribe to other DevelopMentor lists at
http://discuss.develop.com.
You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
Salai Sivadhanam
2003-05-07 13:22:13 UTC
Permalink
Hi All....

I am using VBCOM component to deal with the database, and I am using MS Access for my project.... I am fetching the records in a recordset which is created within a DLL....

Sometime, I am submitting a record into DB, and, immediately I am trying to retrieve that record.... At that time, my DLL is returning nothing, but not a recordset.... But, if I do slowly, or in a debug mode, it's fetching properly and returning the recordset without any problem.... How to overcome this problem....? Will anyone suggest me....??

Salai

You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
Alireza Kheyrollahi
2003-05-14 22:38:00 UTC
Permalink
Always include a snippet of your code. Have you set CursorLocation to
adUseClient?


----- Original Message -----
From: "Salai Sivadhanam" <***@LGSOFTINDIA.COM>
To: <***@DISCUSS.DEVELOP.COM>
Sent: Wednesday, May 07, 2003 2:22 PM
Subject: [VBCOM] Recordset problem....


Hi All....

I am using VBCOM component to deal with the database, and I am using MS
Access for my project.... I am fetching the records in a recordset which is
created within a DLL....

Sometime, I am submitting a record into DB, and, immediately I am trying to
retrieve that record.... At that time, my DLL is returning nothing, but not
a recordset.... But, if I do slowly, or in a debug mode, it's fetching
properly and returning the recordset without any problem.... How to overcome
this problem....? Will anyone suggest me....??

Salai

You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
Salai Sivadhanam
2003-05-15 10:23:17 UTC
Permalink
Hello Mr. Alireza Kheyrollahi....

Here is the function which will get the insert query and processes...

Public Function changedata(sqlstr As String) As String
On Error goto errHandler
changedata = ""
objCon.Execute sqlstr
changedata = kStrMsgSuccess
errHandler:
If Err.Number <> 0 Then
changedata = Err.Number & " : " & Err.Description
End If
End Function

And, Here is my another function which will get select query as parameter and will return the recordset....

Public Function SelectData(sqlstr As String) As Recordset
On Error goto errHandler
Dim rs As New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open sqlstr, objCon, adOpenStatic, adLockReadOnly
Set SelectData = rs
ErrHandler:
If Err.Number <> 0 Then
Set SelectData = Nothing
End If
End Function

Then also, the problem is coming.... It's failing to select the record immediately after submitting the data.... I am getting "[Microsoft][ODBC Microsoft Access Driver] Not a valid bookmark." error.... How to solve this problem....

Salai

-----Original Message-----
From: Technical discussion of VBCOM [mailto:***@DISCUSS.DEVELOP.COM]On Behalf Of Alireza Kheyrollahi
Sent: Thursday, May 15, 2003 4:08 AM
To: ***@DISCUSS.DEVELOP.COM
Subject: Re: [VBCOM] Recordset problem....

Always include a snippet of your code. Have you set CursorLocation to
adUseClient?


----- Original Message -----
From: "Salai Sivadhanam" <***@LGSOFTINDIA.COM>
To: <***@DISCUSS.DEVELOP.COM>
Sent: Wednesday, May 07, 2003 2:22 PM
Subject: [VBCOM] Recordset problem....


Hi All....

I am using VBCOM component to deal with the database, and I am using MS
Access for my project.... I am fetching the records in a recordset which is
created within a DLL....

Sometime, I am submitting a record into DB, and, immediately I am trying to
retrieve that record.... At that time, my DLL is returning nothing, but not
a recordset.... But, if I do slowly, or in a debug mode, it's fetching
properly and returning the recordset without any problem.... How to overcome
this problem....? Will anyone suggest me....??

Salai

You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
Alireza Kheyrollahi
2003-05-15 17:59:59 UTC
Permalink
Hi Salai,

It is so typical of problems from CursorLocation being adUseServer or adUsNone. What I believe might help is that try to log properties like recordcount (which I bet will be -1 because cursor location is not right) and aslo cursor location in case you get any error. I would also think of using another locking option like optimistic for no particular reason!

Another thing is that I wonder why you do not use OLEDB instead of ODBC? It is faster and more reliable and you just have to change connection string which is not a major change:
cn.ConnectionString = "Provider=Microsoft.Jet.Oledb.4.0;Data Source=c:\myDb.mdb"

One of the things I am very much suspect of is returning recordsets as return value of functions. I have seen strange things when recordset has been moving around. Try to use Set SelectData = rs.clone instead of Set SelectData = rs and see if it would help.

The other solution might be adding the record to the same recodset and then using the same routine. I mean using addnew and then update.

Hope this helps.

Ali





----- Original Message -----
From: "Salai Sivadhanam" <***@LGSOFTINDIA.COM>
To: <***@DISCUSS.DEVELOP.COM>
Sent: Thursday, May 15, 2003 11:23 AM
Subject: Re: [VBCOM] Recordset problem....


Hello Mr. Alireza Kheyrollahi....

Here is the function which will get the insert query and processes...

Public Function changedata(sqlstr As String) As String
On Error goto errHandler
changedata = ""
objCon.Execute sqlstr
changedata = kStrMsgSuccess
errHandler:
If Err.Number <> 0 Then
changedata = Err.Number & " : " & Err.Description
End If
End Function

And, Here is my another function which will get select query as parameter and will return the recordset....

Public Function SelectData(sqlstr As String) As Recordset
On Error goto errHandler
Dim rs As New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open sqlstr, objCon, adOpenStatic, adLockReadOnly
Set SelectData = rs
ErrHandler:
If Err.Number <> 0 Then
Set SelectData = Nothing
End If
End Function

Then also, the problem is coming.... It's failing to select the record immediately after submitting the data.... I am getting "[Microsoft][ODBC Microsoft Access Driver] Not a valid bookmark." error.... How to solve this problem....

Salai

-----Original Message-----
From: Technical discussion of VBCOM [mailto:***@DISCUSS.DEVELOP.COM]On Behalf Of Alireza Kheyrollahi
Sent: Thursday, May 15, 2003 4:08 AM
To: ***@DISCUSS.DEVELOP.COM
Subject: Re: [VBCOM] Recordset problem....

Always include a snippet of your code. Have you set CursorLocation to
adUseClient?


----- Original Message -----
From: "Salai Sivadhanam" <***@LGSOFTINDIA.COM>
To: <***@DISCUSS.DEVELOP.COM>
Sent: Wednesday, May 07, 2003 2:22 PM
Subject: [VBCOM] Recordset problem....


Hi All....

I am using VBCOM component to deal with the database, and I am using MS
Access for my project.... I am fetching the records in a recordset which is
created within a DLL....

Sometime, I am submitting a record into DB, and, immediately I am trying to
retrieve that record.... At that time, my DLL is returning nothing, but not
a recordset.... But, if I do slowly, or in a debug mode, it's fetching
properly and returning the recordset without any problem.... How to overcome
this problem....? Will anyone suggest me....??

Salai

You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.


You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
Loading...