Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




The Object Invoked Has Disconnected From Its Clients


Hi,
I have this problem:
My program does report with Crystal Report, and I got a procedure that does a bunch of report.
Every client using the program is connected to a DLL server.
Let's say I have to machines.
1)When they both run just a single report it works fine.
2) if I run a batch report on one machine and either another batch or a very long single report on the other machine I get this error : The object invoked has disconnected from its clients.

I am not sure if it's a CR issue or something else, but for info I use CR9.

Anyone ever got that problem?
Thanks!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
The Object Invoked Has Disconnected From Its Clients
Dear all,

I'm face this error message when I run my application at PC with OS win2000.
It is ok when it run on OS win98 and winXP.
I find out it keep on looping at the code (color in blue) when the step into the char * (color in red)

I have go thru some of the previous Thread, it seem not really same case.

Is there any suggestion? anyone face the same problem too?

Thank you
Regards
Eric

Code attach

Sub PrintSinglePremNotes()

On Error GoTo errorhandler:
' English

CPrint.pPrint
CPrint.pPrint "Notes:", 0.5, False
Dim a As String
Dim B As String
Dim c As String
Dim d As String
Dim e As String


a = "The projected benefit above are purely for illustration purposes only. The assumption on the range .................lustrated to be earned on meant to "
B = "represent or be indicative of..................returns of the fund(s). The may go down as well as up. "
c = "The value of the fund might fall below the accumulated premium paid. If the policy is ............................you may get less than the amount premium paid."
e = "* In the event of Death or Total Permanent for all funds available to the plan."
d = a & B & c
CPrint.pPrint d, 0.5, False
CPrint.pPrint e, 0.5, False

' Malay
CPrint.FontItalic = True
CPrint.pPrint
CPrint.pPrint "Nota-nota:", 0.5, False

Dim z As String
Dim y As String
Dim x As String
Dim w As String
z = "Unjuran faedah-faedah di atas hanya unt.....................tujuan ilustrasi sahaja. dan tidak bermaksud "
y = "untuk mewakili atau sebagai petunjuk bagi pulangan sebenar dana(dana-dana). ...............................................yang dilustrasikan TIDAK mewakili unit mungkin jatuh dan naik. Nilai "
x = "dana mungkin jatuh di bawah premium terkumpul dibayar."

w = z & y & x
CPrint.pPrint w, 0.5, False

CPrint.pPrint "* ", 0.5, True

CPrint.pPrint "Sekiranya berlaku Kematian atau Hilang Upaya Menyeluruh dan Kekal, pembayaran faedah ditentukan sebagai " & _
"Tergabung bagi kesemua dana yang tersedia " & _
"dalam pelan.", , False
CPrint.FontItalic = False

Exit Sub

errorhandler:
MsgBox err.Description & err.HelpFile

------

Public Sub pPrint(Optional ByVal PrintVar As String = vbNullString, _
Optional ByVal LMargin As Single = -1, _
Optional SameLine As Boolean = False, _
Optional ByVal RMargin As Single = -1)


If PrintVar = vbNullString Then
'/* Empty String */
Else
If LMargin = -1 Then LMargin = CurrentX
If RMargin = -1 Then
If GetTextWidth(PrintVar) + LMargin > PgWidth - 0.3 Then
pMultiline PrintVar, LMargin, PgWidth - 0.5, , SameLine
Exit Sub
End If
Else
If GetTextWidth(PrintVar) + LMargin > RMargin Then
pMultiline PrintVar, LMargin, RMargin, , SameLine
Exit Sub
End If
End If
End If

If LMargin >= 0 Then CurrentX = LMargin

If SameLine Then
If PrintFlag Then
Printer.Print PrintVar;
Else
pageobject.Add_Font objPrint.FontName, objPrint.FontSize, objPrint.ForeColor, objPrint.FontBold, objPrint.FontItalic, objPrint.FontUnderline, objPrint.FontStrikethru, objPrint.FontTransparent
pageobject.Add_Text PrintVar, objPrint.CurrentX * 1440, objPrint.CurrentY * 1440
objPrint.Print PrintVar;
End If
Else
If PrintFlag Then
Printer.Print PrintVar
Else
pageobject.Add_Font objPrint.FontName, objPrint.FontSize, objPrint.ForeColor, objPrint.FontBold, objPrint.FontItalic, objPrint.FontUnderline, objPrint.FontStrikethru, objPrint.FontTransparent
pageobject.Add_Text PrintVar, objPrint.CurrentX * 1440, objPrint.CurrentY * 1440
objPrint.Print PrintVar
End If
End If
End Sub

Object Invoked Has Disconnected From Its Clients
We are developing an activeX dll that calls a C dll using the "Private Declare Function" method to do LDAP calls for authentication. On 2 of our 4 servers the first call works but subsequent calls throw the error "Object Invoked Has Disconnected From Its Clients".

Any ideas on what could be causing this?

All the servers are w2k

thanks,

The Object Invoked Has Disconnected From Its Clients
Hi,

I have one application (standard exe) that opens one dll (with forms, classes inside it).

After the dll is called I get the main form (from the dll). However, if I click in anything on it I get this error message: "Run-time error - 2147417848 The object invoked has disconnected from its clients"

the code I´m using is this:

On the main exe:

Dim con As ADODB.Connection
Dim lcl_prof As Prof.CLS_Start

Set lcl_prof = New Profissao.CLS_Start
Set con = New ADODB.Connection
con.Open "Provider = MSDAORA.1; Data source = bdgrc; user id = userid; password = userpw;"
lcl_prof.ligacaoBD con  'passing the connection by ref
End Sub


On the dll: (only the begining code)

Public sub ligacaoBD(ByRef con As ADODB.Connection)

    Set gbl_conPri = New ADODB.Connection
    Set gbl_conPri = con
    FRM_prof.Show
        
End Sub

After the FRM_prof appears I will call another form... etc...like an independent application.

However I receive that error :(

Any help is appreciated

Thank you


The Object Invoked Has Disconnected From Its Clients.
When I call a C++ COM Object from a VB COM object I get the following message:

Automation error
The object invoked has disconnected from its clients.

However if I call the same object with an EXE it works perfectly.

I have written both COM+ objects and they seem to be ok

Any help??

Cheers

Rob

The Object Invoked Has Disconnected From Its Clients - UltraGrid / VB6
Hi,

I'm using Infragistics UltraGrid. When I try and use its Print function I
Get this error message:
The object invoked has disconnected from its clients

This only seems too happen when running on a Win2003 Server (fully upto date
with patches). If I run on a Win XP then no error is recived.

I have found many articles where this error could happen ie calling the
crystal reports control, Office Automation etc. I've also seen articles
where to update MDAC.

I've looked on Infragistics forums although someone has asked about this
problem no solution was given. Also UltraGrid 2 is no longer support by
Infragistics

Anyone come accross this using this Grid?
I only have one line of code and it's:
Code:grdStockBalReconciliation.PrintPreview True

This should then bring up a print preview window.


Thanks in advance
Darren

P.S IGULTRAGRID20.OCX requires IGPRINT.DLL to beable to print.

Automation Error: The Object Invoked Has Disconnected From Its Clients
Does anyone know what this error means or why it occurs???!

"Automation Error: The Object invoked has disconnected from its clients"

Automation Error. The Object Invoked Has Disconnected From Its Clients
I have one program. It is working without any problem. But when we create a package and install it, the exe file works.

But in some time it shows an error that ‘Automation Error. The object invoked has disconnected from its clients.


It fails every time when we open one or two particular forms.

But other forms are working properly.

But these specified forms are working well when we open this from VB itself (Run program from VB). Then problem is only when open the installed program in the same system or any other system(ie. Exe pgm in another folder )

This is windows app. Program. But the database is in server connecting with DSN. At the same time we are connecting with another database in the client system itself.

Please give me a solution.

Automation Error -2147417848 The Object Invoked Has Disconnected From Its Clients
I've seen several posts about this but non that really help!

I get this only when running the program as an executable..... Never in Visual Basic...

I've isolated it to one routine, but can't figure out what this message is trying to tell me... I trap the error now, and the program seems to continue to work just fine after the error... but I really think I should track it down!

Getting Automation Error " The Object Invoked Has Disconnected From Its Clients
I m getting automation error whenever i m trying to retrieve more than 500 items from a grid in Visual Basic.I m using a MSH Flexi Grid.

Suggestions are invited......

Object Invoked Has Disconnected
Hey guys first timer

I know one you guys can answer this one

This code works:

Code:
Sub UserForm_Click()
Dim testcl As ClsMonteCarlo
Dim arrayinput() As Long
ReDim arrayinput(30)
arrayinput(0) = 12
Set testcl = New ClsMonteCarlo
testcl.Init 2, 33, 4, 5
testcl.a_input = arrayinput
End Sub


'ClsMonteCarlo

Option Explicit
Public m_outlay As Integer
Public m_exo As Long
Public m_edoarray As Long
Public m_duration As Long
Public m_discount As Long
Private m_arrayinput() As Long

Public Property Let a_input(a_input() As Long)
m_arrayinput = a_input
End Property

Public Property Get a_input() As Long()
a_input = m_arrayinput
End Property

Friend Sub Init(outlay As Integer, exo As Long, _
duration As Long, discount As Long)
Me.m_outlay = outlay
Me.m_exo = exo
Me.m_duration = duration
Me.m_discount = discount
End Sub
but in the spirt of making code more user friendly, i want to put a_input in the init sub. I have tried this but get "object invoked has disconnected from its clients"

Here is my new code:

Code:
Option Explicit

Sub UserForm_Click()

Dim testcl As ClsMonteCarlo
Dim arrayinput() As Long
ReDim arrayinput(30)
arrayinput(0) = 12
Set testcl = New ClsMonteCarlo
testcl.Init 2, 33, 4, 5, arrayinput

End Sub

'ClsMonteCarlo

Option Explicit

Public m_outlay As Integer
Public m_exo As Long
Public m_edoarray As Long
Public m_duration As Long
Public m_discount As Long
Private m_arrayinput() As Long

Public Property Let a_input(bValue() As Long)
m_arrayinput = a_input
End Property

Public Property Get a_input() As Long()
a_input = m_arrayinput
End Property

Friend Sub Init(outlay As Integer, exo As Long, _
duration As Long, discount As Long, arrayinput() As Long)
Me.m_outlay = outlay
Me.m_exo = exo
Me.m_duration = duration
Me.m_discount = discount
Me.a_input = arrayinput
End Sub

I'm sure its simple thanks. This forum is great
Edit by Moderator: Please use the [vb][/vb] tags when you post code. Reply to or edit this post to see how.

Object Invoked Has Disconnected......
Hi Gurus,
I am facing a problem while running my VB project. Whenever I run a few data reports in succession (sometimes running them after this error occurs) I get the following runtime automation error:
The Object invoked has disconnected from its clients.

The project after this message closes if I chose to end and not debug. If I debug and run it again it gives message that the report is already called or something.

Backend: password protected MSAccess The connection object is a global one returned from a data environment.

I am not able to make out what is this error and how to get rid of it. An early help will be appreciated.

80010108 Object Invoked Has Disconnected...
When running the Package & Deployment on my project, I'm getting this error 80010108: The object invoked has disconnected from its clients.

I've researched it and it appears to be a problem with Crystal Reports. I've found the fix (editing the Crystl32.dep file), but I'm running XP pro and I can't find that file anywhere.

Can someone please help me with this? Thanx in advance.

~m.

Object Invoked Has Disconnected From The Client
I have just recently transfered by project to an XP machine (Machine A) from a my development machine (win2000, crystal reports 8.5, Acess 2000 but using access97 database, VB6). The Machine A is connected to a dot matrix printer and a laser printer. Reports printed using laser printer is OK but reports using dot matrix is not. When i run the EXE, the error
"Object invoked has disconnected from the client"
follow by
"Memory at location XXX cant be written at location XXX" (the error was long so i cant remember the exact words)

appears. My program uses 3rd party component by Data Widgets2.0... so.. when i run the PROJECT file, the error
"Data Widgets- You dont have license to use this software" etc

appears and the project crash immediately.This only happens when i try to print anything using dot matrix. Reports can be printed fine using laser jet.

So is this incompatibility of Data widgets with XP? or with Dot matrix? or is it problem with the printer driver? or is it incompatibility of crystal reports with dot matrix. i know for sure this error only comes out if i print using dot matrix.
can some please help me to solve this? i couldnt figure out what is the problem. and yes i have installed mdac 2.0 til mdac8.0 and have updated the XP

Object Invoked Is Disconnected From Client
Currently I was using 'Package and Deployment wizard' of VB 6.0.
After clicking the 'Finish' button the following error occured

'Automation error. Object invoked has disconnected from client'

could you please give me the cause and solution for this problem?

Thank you

Object Invoked Disconnected From Its Client Error While Importing Excel File ?
sir,
i am importing a excel file
i displayed the sheet names in a list box,while select the sheet ,that particular sheet will be imported

the error is at the time of processing the file,updating the excel file occurs

steps
open the file ,import the sheet
now open the excel file ,modify it and save,dont close
now click the updated sheet to import
now i am getting the error
as"object invoked disconnected from its client"
plz any can help me to solve this,
its very urgent!


senthil
 

coding sample: dont consider commented lines

Code:
#Region "common variables"
    Private objServer As New Blaze.Consumption.BackOffice.ConsumptionServer
    Private objBOBOMGenerator As New Blaze.Consumption.BackOffice.BOBOMGenerator
    Private objBOMGenerator As New Blaze.Consumption.Facade.BOMGenerator
    Private objIteminfo As New Blaze.Consumption.Facade.ItemDetails

    Dim newRow As DataRow
    Private bomId As String
    Private fileName As String
    Private dsBOMImport As DataSet
    Private formDisplay As Boolean

    Private xlApp As Excel.Application
    Private xlWB As Excel.Workbook
    Private xls As Excel.Worksheet
    Private table As New DataTable
#End Region


#Region "populate category"
    Private Sub PopulateCategory()
        Dim dsCategory As DataSet
        dsCategory = objServer.FetchDataSet("Con_SelectCategoryMaster", "Category")
        If dsCategory.Tables(0).Rows.Count > 0 Then
            formDisplay = False
            cmbCategory.DropDownStyle = ComboBoxStyle.DropDownList
            Me.cmbCategory.DataSource = dsCategory.Tables("Category")
            Me.cmbCategory.DisplayMember = "Name"
            Me.cmbCategory.ValueMember = "Category ID"
            Me.cmbCategory.SelectedIndex = -1
        Else
            MessageBox.Show("Category Does not exists", Me.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information)
            formDisplay = True
            Exit Sub
        End If
    End Sub
#End Region

#Region "Form Load"
    Private Sub frmBOMImport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try
            Me.InitializeDataGrid()
            Me.gbItemDetails.Enabled = False
            Me.gbView.Visible = True
            Me.gbAdd.Visible = False
            Me.dgItemList.ReadOnly = True
            Me.lblMessage.Text = "Select The BOM Excel File To Import"
            Me.PopulateCategory()

            table.Columns.Clear()
            table.Columns.Add("ItemID")
            table.Columns.Add("Description")
            table.Columns.Add("Unit")
            table.Columns.Add("Quantity")

            If Me.CanAdd = False Then
                Me.butImport.Enabled = False
            Else
                Me.butImport.Enabled = True
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message, Me.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
        Finally
            Me.gbView.Enabled = False
        End Try
    End Sub
#End Region

#Region "Import BOM Details"
    Private Sub butImport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butImport.Click
        ' Create a dialog box to find the excel file
        Dim dlgBOMImport As New Windows.Forms.OpenFileDialog
        Dim intRows, intCols As Integer
        'Dim r, c As Integer
        Try
            dlgBOMImport.Filter = "Excel Files (*.xls)/*.xls"
            dlgBOMImport.FilterIndex = 0
            dlgBOMImport.ShowDialog()
            'get the file name
            fileName = dlgBOMImport.FileName
            ' Dim fileinfo As New System.IO.FileInfo(strFileName)
            If fileName.Trim.Length <> 0 Then
                xlApp = New Excel.Application
                Try
                    'Dim fi As New System.IO.FileInfo(fileName)
                    'fi.Open(System.IO.FileMode.Open)
                        xlWB = xlApp.Workbooks.Open(fileName:=fileName, [ReadOnly]:=True)
                        xls = xlWB.Sheets(1)
                Catch ex As Exception
                    MessageBox.Show("File Already opened,Plz Close and Try again to Open", Me.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information)
                    Exit Sub
                End Try

                If Convert.ToString(CType(xls.Cells(3, 1), Excel.Range).Text).Trim = "IDNR" And Convert.ToString(CType(xls.Cells(3, 2), Excel.Range).Text).Trim = "Description" And Convert.ToString(CType(xls.Cells(3, 3), Excel.Range).Text).Trim = "Unit" Then
                    'MessageBox.Show("matches")
                    Me.lblMessage.Text = "File Matches"

                    'gets the bomid to checkwhether it exists or not in bomdetails
                    bomId = CType(xls.Cells(1, 2), Excel.Range).Text
                    objBOMGenerator.BOMId = bomId
                    objBOMGenerator.Operation = Facade.OperationType.Check
                    objBOMGenerator = objServer.BOMService(objBOMGenerator)
                    If objBOMGenerator.RetVal = 0 Then
                        'MessageBox.Show("bomid not exists")
                        Me.lblMessage.Text = "BOMID not Exists,So Creating New BOM ID"
                        'bomid not exists,so add new bom id in bommaster
                        objBOMGenerator.BOMId = bomId
                        objBOMGenerator.Operation = Facade.OperationType.AddBOMMaster
                        objBOMGenerator = objServer.BOMService(objBOMGenerator)
                        If objBOMGenerator.Result = Facade.ResultType.Success Then
                            'MessageBox.Show("bom id added")
                            Me.gbSelectFile.Enabled = False
                            objBOMGenerator.BOMId = bomId
                            dsBOMImport = objServer.FetchBOMDetails(objBOMGenerator, "BOMImport")
                            Me.dgView.DataSource = dsBOMImport.Tables("BOMImport")
                            Me.gbView.Visible = False
                            Me.gbAdd.Visible = True
                            Me.gbAdd.Enabled = False
                            Call Me.getExcelData()
                        End If
                    Else
                        'MessageBox.Show("bomid exists")
                        'bom id already exists,so fetch all the details in bomdetails and show it in datagrid
                        objBOMGenerator.BOMId = bomId
                        dsBOMImport = objServer.FetchBOMDetails(objBOMGenerator, "BOMImport")
                        Me.dgView.DataSource = dsBOMImport.Tables("BOMImport")
                        Me.gbView.Visible = True
                        Me.gbView.Enabled = True
                        'asking to update the bomid
                        Me.lblMessage.Text = "Do You Want To Update The BOM Details ?"
                        If (MessageBox.Show("BOM Details Already Exists,Do You want to update the BOM details,Surely ?", Me.MessageTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes) Then
                            Me.gbSelectFile.Enabled = False
                            Me.lblMessage.Text = "Clicked Yes"
                            Me.gbView.Visible = False
                            Me.gbAdd.Visible = True
                            Me.gbAdd.Enabled = False
                            'if yes,delete the items from bomid
                            objBOMGenerator.BOMId = bomId
                            objBOMGenerator.Operation = Facade.OperationType.DeleteBOMDetails
                            objBOMGenerator = objServer.BOMService(objBOMGenerator)
                            Call Me.getExcelData()
                        Else
                            Me.gbView.Enabled = False
                            If Not dsBOMImport.Tables("bomimport") Is Nothing Then
                                dsBOMImport.Tables("bomimport").Clear()
                            End If
                            If Not dsBOMImport.Tables("import") Is Nothing Then
                                dsBOMImport.Tables("import").Clear()
                            End If
                            Me.dgView.DataBindings.Clear()
                        End If
                    End If

                Else
                    Me.lblMessage.Text = "Select The Perfect File"
                    MessageBox.Show("Please Select The Correct File", Me.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information)
                End If
            Else
                'MessageBox.Show("Select the File", Me.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information)
                'Me.lblMessage.Text = "Select The File"
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message, Me.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
        Finally
        End Try
    End Sub
#End Region

#Region "Get Excel Data"
    Sub getExcelData()
        Dim listCount As Integer = 0
        Dim adpBOMImport As OleDb.OleDbDataAdapter
        Dim comBOMImport, conBOMImport As String
        'convert the excel data as dataset
        Convert.ToString(CType(xlWB.Sheets.Item(1), Excel.Worksheet).Name)
        comBOMImport = " SELECT * FROM " & "[" & Convert.ToString(CType(xlWB.Sheets.Item(1), Excel.Worksheet).Name) & "$]"
        conBOMImport = " Provider = Microsoft.Jet.OLEDB.4.0 ; Data Source =" + fileName + ";Extended Properties=Excel 8.0"
        Dim conn As New OleDb.OleDbConnection(conBOMImport)
        adpBOMImport = New OleDb.OleDbDataAdapter(comBOMImport, conn)
        adpBOMImport.Fill(dsBOMImport, "import")
        Dim count As Integer
        count = dsBOMImport.Tables("import").Rows.Count

        For i As Integer = 2 To count - 1
            Me.lblMessage.Text = "Checks item ID Exists or Not"
            'checks whether the item id is exists or not

            'If Convert.ToString(dsBOMImport.Tables("import").Rows(i).Item(0)).Trim.Length = 0 Then
            If Not (dsBOMImport.Tables("import").Rows(i).Item(0) Is DBNull.Value) Then
                objiteminfo.ItemId = dsBOMImport.Tables("import").Rows(i).Item(0)
                objiteminfo.Operation = Facade.OperationType.Check
                objiteminfo = objServer.ItemService(objiteminfo)
                If objiteminfo.RetValue = 0 Then
                    'MessageBox.Show("Item ID Not Exists,So create", Me.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information)
                    'MessageBox.Show("item id not exists,so create")
                    'Me.lstBOM.Items.Add(Convert.ToString(dsBOMImport.Tables("import").Rows(i).Item(0)))
                    newRow = table.NewRow
                    newRow("ItemId") = dsBOMImport.Tables("import").Rows(i).Item(0)
                    newRow("Description") = dsBOMImport.Tables("import").Rows(i).Item(1)
                    newRow("Unit") = dsBOMImport.Tables("import").Rows(i).Item(2)
                    newRow("Quantity") = dsBOMImport.Tables("import").Rows(i).Item(3)
                    table.Rows.Add(newRow)
                    listCount += 1
                Else
                    'MessageBox.Show("item id exists so save")
                    Me.lblMessage.Text = "Item Id Exists"
                    'item id exists already,so save it
                    'before save check the itemid already exists in bomdetails for a particular bom id
                    objBOMGenerator.ItemId = dsBOMImport.Tables("import").Rows(i).Item(0)
                    objBOMGenerator.BOMId = bomId
                    objBOMGenerator.Operation = Facade.OperationType.checkBOMIDItemIDExistence
                    objBOMGenerator = objServer.BOMService(objBOMGenerator)
                    If objBOMGenerator.RetVal = 0 Then
                        objBOMGenerator.ItemId = dsBOMImport.Tables("import").Rows(i).Item(0)
                        objBOMGenerator.Qty = dsBOMImport.Tables("import").Rows(i).Item(3)
                        objBOMGenerator.BOMId = bomId
                        objBOMGenerator.Operation = Facade.OperationType.AddBOMDetails
                        objBOMGenerator = objServer.BOMService(objBOMGenerator)
                        If objBOMGenerator.Result = Facade.ResultType.Failure Then
                            Throw New Exception(objBOMGenerator.Exception)
                        End If
                    End If
                End If
            End If
        Next
        If listCount <> 0 Then
            gbAdd.Enabled = True
            MessageBox.Show(" Items saved successfully except Items Listed ", Me.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information)
            Me.dgItemList.DataSource = table
            Me.lblMessage.Text = "Item details which Not Exists are listed,select the Item to Create and save"
        Else
            MessageBox.Show(" Items saved successfully", Me.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information)
            Me.lblMessage.Text = "Item ID Saved Successfully"
            Me.gbAdd.Enabled = False
            Me.gbSelectFile.Enabled = True
            dsBOMImport.Tables("bomimport").Clear()
            dsBOMImport.Tables("import").Clear()
        End If
    End Sub

   
#Region "Add BOM ITEM DETAILS"
    Private Sub butAdd_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butAdd.Click
        If Me.dgItemList.CurrentRowIndex = -1 Then
            MessageBox.Show("Select The Item Code/Item UnAvailable", Me.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information)
            Exit Sub
        End If
        Me.txtItemId.Text = table.Rows(Me.dgItemList.CurrentRowIndex).Item(0)
        Me.txtDesc.Text = table.Rows(Me.dgItemList.CurrentRowIndex).Item(1)
        Me.txtUnitName.Text = table.Rows(Me.dgItemList.CurrentRowIndex).Item(2)
        Me.txtItemId.Enabled = False
        Me.txtDesc.Enabled = False
        Me.txtUnitName.Enabled = False
        Me.gbItemDetails.Enabled = True
        Me.gbAdd.Enabled = False

    End Sub

    
#Region " Create New Item"
    Private Sub butCreate_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butCreate.Click
        Try
            If Me.cmbCategory.SelectedIndex = -1 Then
                Me.lblMessage.Text = "Please,Select the Category"
                MessageBox.Show("Please select the Category ", Me.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information)
                Me.cmbCategory.Focus()
                Exit Sub
            End If


            If (txtUnitPrice.Text.Trim() = "") Then
                Me.lblMessage.Text = "Please,Enter The Unit Price"
                MessageBox.Show("Please enter the Unit Price", Me.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning)
                txtUnitPrice.Focus()
                Exit Sub
            ElseIf txtUnitPrice.Text = "." Then
                Me.lblMessage.Text = "Please,Enter The Unit Price"
                MessageBox.Show("Please enter the Unit Price", Me.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning)
                txtUnitPrice.Focus()
                Exit Sub
            ElseIf (Convert.ToDouble(txtUnitPrice.Text.Trim()) = 0) Then
                Me.lblMessage.Text = "Please,Enter The Unit Price"
                MessageBox.Show("Please enter the Unit Price", Me.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning)
                txtUnitPrice.Clear()
                txtUnitPrice.Focus()
                Exit Sub
            ElseIf (Len(txtUnitPrice.Text) > 4 And InStr(txtUnitPrice.Text, ".") = 0) Then
                Me.lblMessage.Text = "Please,Enter The Unit Price"
                MessageBox.Show("Please,Enter The valid unit price", Me.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning)
                txtUnitPrice.Clear()
                txtUnitPrice.Focus()
                Exit Sub
            ElseIf (InStr(txtUnitPrice.Text, ".") > 5) Then
                Me.lblMessage.Text = "Please,Enter The Unit Price"
                MessageBox.Show("Please,Enter The valid unit price", Me.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning)
                txtUnitPrice.Clear()
                txtUnitPrice.Focus()
                Exit Sub

            End If


            If Me.txtArtNo.Text.Trim.Length = 0 Then
                objiteminfo.ArticleNumber = Nothing
            Else
                objiteminfo.ArticleNumber = Convert.ToInt16(Me.txtArtNo.Text.Trim)
            End If

            objiteminfo.ItemId = Convert.ToString(Me.txtItemId.Text.Trim)
            objiteminfo.CategoryId = Me.cmbCategory.SelectedValue
            objiteminfo.ItemDesc = Convert.ToString(Me.txtDesc.Text.Trim)
            objiteminfo.UnitOfMeasure = Convert.ToString(Me.txtUnitName.Text.Trim)
            objiteminfo.UnitPrice = Convert.ToDecimal(Me.txtUnitPrice.Text.Trim)

            objiteminfo.Operation = Facade.OperationType.Add
            objiteminfo = objServer.ItemService(objiteminfo)
            If objiteminfo.Result = Facade.ResultType.Success Then
                objBOMGenerator.ItemId = table.Rows(Me.dgItemList.CurrentRowIndex).Item(0)
                objBOMGenerator.Qty = table.Rows(Me.dgItemList.CurrentRowIndex).Item(3)
                objBOMGenerator.BOMId = bomId
                objBOMGenerator.Operation = Facade.OperationType.AddBOMDetails
                objBOMGenerator = objServer.BOMService(objBOMGenerator)
                If objBOMGenerator.Result = Facade.ResultType.Success Then
                    MessageBox.Show("saved successfully", Me.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information)
                    Me.lblMessage.Text = "Item ID Saved Successfully"
                    table.Rows(Me.dgItemList.CurrentRowIndex).Delete()
                    Me.gbItemDetails.Enabled = False
                    Me.gbAdd.Enabled = True

                    Me.cmbCategory.SelectedIndex = -1
                    Me.txtUnitPrice.Text = ""
                    Me.txtArtNo.Text = ""
                Else
                    Throw New Exception(objBOMGenerator.Exception)
                End If
            Else
                Throw New Exception(objiteminfo.Exception)
            End If

        Catch ex As Exception
            MessageBox.Show(ex.Message, Me.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
        Finally
        End Try
    End Sub
  #End Region

#Region "Cancel Options"
    Private Sub butSelectCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butSelectCancel.Click
        If Not (xlWB Is Nothing) Then xlWB.Close(False)
        xlWB = Nothing
        If Not (xlApp Is Nothing) Then xlApp.Quit()
        xlApp = Nothing
        xls = Nothing
        Me.Close()
        'If Not (dsBOMImport.Tables("bomimport") Is Nothing) Then
        ' dsBOMImport.Tables("bomimport").Clear()
        'End If
        'If Not (dsBOMImport.Tables("import") Is Nothing) Then
        ' dsBOMImport.Tables("import").Clear()
        'End If
        Me.dgView.DataBindings.Clear()
        table.Dispose()
        table.Columns.Clear()
        table.Rows.Clear()
    End Sub
    Private Sub butAddCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butAddCancel.Click
        Dim dsBOMImportCheck As New DataSet
        objBOMGenerator.BOMId = bomId
        dsBOMImportCheck = objServer.FetchBOMDetails(objBOMGenerator, "BOMImport")
        If dsBOMImportCheck.Tables("BOMImport").Rows.Count = 0 Then
            MessageBox.Show("Add atleast one item to exit", Me.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information)
            Exit Sub
        End If
        dsBOMImportCheck.Tables("BOMImport").Clear()
        Me.gbAdd.Visible = False
        Me.gbView.Visible = True
        Me.gbView.Enabled = False
        Me.gbSelectFile.Enabled = True
        dsBOMImport.Tables("import").Clear()
        table.Rows.Clear()
        Me.dgItemList.DataBindings.Clear()
        dsBOMImport.Tables("bomimport").Clear()
        Me.dgView.DataBindings.Clear()
        Me.lblMessage.Text = "Select Next file To Import"
    End Sub
    Private Sub butSavecancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butSavecancel.Click
        Me.lblMessage.Text = "Select The Next Item"
        Me.gbItemDetails.Enabled = False
        Me.gbAdd.Enabled = True
        Me.cmbCategory.SelectedIndex = -1
        Me.txtUnitPrice.Text = ""
        Me.txtArtNo.Text = ""
    End Sub
#End Region

#Region "KeyPress Events"
    Private Sub txtArtNo_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtArtNo.KeyPress
        If Asc(e.KeyChar) = 13 Then
            Me.txtUnitPrice.Focus()
        End If
        If (Len(txtArtNo.Text) >= 8 And Asc(e.KeyChar) <> 8) Then
            e.Handled = True
            Exit Sub
        End If
        If Not ((Asc(e.KeyChar) >= 48 And Asc(e.KeyChar) <= 57) Or Asc(e.KeyChar) = 8) Then
            e.Handled = True
        End If
    End Sub
    Private Sub txtUnitPrice_KeyPress1(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtUnitPrice.KeyPress
        If Asc(e.KeyChar) = 13 Then
            Me.butCreate.Focus()
        End If
        If (Len(txtUnitPrice.Text) >= 8 And Asc(e.KeyChar) <> 8) Then
            e.Handled = True
            Exit Sub
        End If

        'to accept maximum 5 digits before decimal part
        If (Len(txtUnitPrice.Text) = 4 And InStr(txtUnitPrice.Text, ".") = 0) Then
            If (Asc(e.KeyChar) <> 46) Then
                e.Handled = True
            End If
        End If

        If Not ((Asc(e.KeyChar) >= 48 And Asc(e.KeyChar) <= 57) Or Asc(e.KeyChar) = 8 Or Asc(e.KeyChar) = 32 Or Asc(e.KeyChar) = 46) Then
            e.Handled = True
        End If
        If InStr(txtUnitPrice.Text, ".") > 0 Then
            If Asc(e.KeyChar) = 46 Then
                e.Handled = True
                Exit Sub
            End If
            If (Len(txtUnitPrice.Text) - 3) = InStr(txtUnitPrice.Text, ".") And Asc(e.KeyChar) <> 8 Then
                e.Handled = True
                Exit Sub
            End If
        End If
    End Sub
#End Region

#Region "Form Activate"
    Private Sub frmBOMImport_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated

        If Me.formDisplay = True Then
            Me.Close()
        End If

    End Sub
#End Region

End Class





Edited by - Geof on 7/13/2006 6:42:59 AM

The Object Found Has Been Disconnected From Its Clients.. Automation Error -214714784
Hello ,

I have encountered a problem of system error -2147147848
Automation Error..
The Object found has been disconnected from its clients.

Also this is while trying to open a crystal report via a VB Application

and while registering with the server
regsvr32 crpe32.dll

The error message

crpe32.dll was loaded, but the DLLRegisterServer entry point was not found.

DllRegisterServer may not be exported, or a curropt version of crpe32.dll may be in the memory. Consider using PView to detect and remove it.

If anyone has a solution please post it over...

Many Thanks,
Amit

"The Object Invoked Has Disconnected From Its Client" Autocad VBA
Hi,                                                
I am getting the error message      (err.number -2147417848) in AUTOCAD VBA program, while traversing each layout in autocad drawing I m converting the current layout to .eps and then into .pdf. I am able to create the PDF for first layout but     getting error while setting the second layout. Waiting for response if any body know resolution for this error.

Thanx and regards,
Dnyanesh                    .
                

Automation Error (object Invoked ....)
hi ,,


i've created a system using VB6 .. make an installation package and tried to install it on other computers .. it worked on some .. but on soem computers i get thsi error when i try to insert data in the system ..

run-time error 2147417848
automation error
the object invoked from its clients

*note: am using DataGrids


Automation Error -2147417848 The Object Invoked...
Hi everybody !

I installed my app on three machines. On one machine when I start the app, I received this message:

Automation Error -2147417848 The object invoked has disconnected from its clients

I searched on this forum and I dont find a solution ? Please help me !

Thanks !

Automation Error -2147417848 The Object Invoked Has....
Hi everybody !

I installed my app on three machines. On one machine when I start the app, I received this message:

Automation Error -2147417848 The object invoked has disconnected from its clients

I searched on this forum and I dont find a solution ? Please help me !

Thanks !

Object Has Diconnected From Clients
Hello All,
One of my user all the sudden got this error message "Automation Error - Object has diconnected from Clients". This is the first time I've ever seen it. Any ideas how to fix it. Thank you very much.

[urgent] Disconnected Object Error (run Time)
Im working in vb6 and im getting an error

Error Number : -2147417848
Error Message : "The object invoked has disconnected from its client"


but this problem is just when i execute exe file of my proj but if i execute it from my code it won't give me any error.... plz reply

Passing Disconnected Recordset From VB COM Object To ASP Script..need Help
I am writing an ASP application that retrieves results from multiple databases (3 DB2 and 1 SQL Server) simultaneously. In order to speed up response time I am executing all queries asynchronously using ADO to run the multiple queries in parallel. I then take the results of each query and combine them into a disconnected recordset and return this recordset to the script. This works great when I use my laptop as the server and client, but when I deploy to a test server and hit from a remote computer I get a 424 "Object Required" error at the point in the script where I run the COM Object "Execute" method. Both the ASP script and VB6 COM Object (ActiveX DLL) are deployed under the same virtual directory on an IIS 5 Webserver. I suspect it has something to do with having to use adUseClient cursor location for the disconnected recordsets, but I can't come up with a way around this. Is this really my problem? Anyone have any ideas on how to fix? Thanks a bunch.....

Relevant code from ASP script:

Code:
'Create ADO recordset for storing SQL queries to send to COM object
Dim sqlRS
set sqlRS = Server.CreateObject("ADODB.recordset")
sqlRS.CursorLocation = 3 'adUseClient
sqlRS.CursorType = 3 'adOpenStatic


sqlRS.Fields.Append "SQLString", 200, 500000 '200 = adVarChar

sqlRS.Open
sqlRS.ActiveConnection = Nothing


'Create ADO recordset for storing connection strings to send to COM object (order must match order of sqlRS)
Dim dbconnRS
set dbconnRS = Server.CreateObject("ADODB.recordset")
dbconnRS.CursorLocation = 3 'adUseClient
dbconnRS.CursorType = 3 'adOpenStatic


dbconnRS.Fields.Append "ConnString", 200, 2000 '200 = adVarChar

dbconnRS.Open
dbconnRS.ActiveConnection = Nothing

Dim dResults
Dim dbRetObject

set dbRetObject = Server.CreateObject("RetrieveRETData.Retrieve")

'Call the COM object to execute all the queries against the appropriate DBs and return an ADO recordset with the federated results
set dResults = dbRetObject.Execute(dbconnRS,sqlRS)



VB COM Object Method Code snippet:

VB Code:
Public Function Execute(ByVal DBConnections As ADODB.Recordset, _ByVal SQLStatements As ADODB.Recordset) As ADODB.Recordset  Dim MasterRS As New ADODB.RecordsetDim finished As BooleanDim tempFin As Boolean  'Define the Recordset that will contain the federated results of all queriesMasterRS.CursorLocation = adUseClientMasterRS.CursorType = adOpenStatic MasterRS.Fields.Append "NameTagCall", adVarChar, 16MasterRS.Fields.Append "Location", adVarChar, 254MasterRS.Fields.Append "NameTagFolder", adVarChar, 10MasterRS.Fields.Append "ArchiveDate", adDBTimeStampMasterRS.Fields.Append "ObjId", adChar, 16MasterRS.Fields.Append "FileName", adVarChar, 64MasterRS.OpenMasterRS.ActiveConnection = Nothing  ' Loop through all the Connection Strings and execute queries asynchronously Do While Not DBConnections.EOF   Set conn = New Connection  Dim cmd As New ADODB.Command   cmd.CommandText = SQLStatements("SQLString")  cmd.CommandType = adCmdText  cmd.CommandTimeout = 3600   Set rs = New ADODB.Recordset   conn.Open DBConnections("ConnString")   Set cmd.ActiveConnection = conn   rs.CacheSize = 10000   rs.Open cmd, , , , adAsyncExecute   Set rsArray(count) = rs   DBConnections.MoveNext  SQLStatements.MoveNext  count = count + 1   Set rs = Nothing  Set conn = Nothing  Set cmd = Nothing Loop finished = False  'Test to ensure that all DB queries have finishedWhile Not finished   finished = False  tempFin = True   For i = 0 To UBound(rsArray)    If ((rsArray(i).State <> adStateFetching) And (rsArray(i).State <> adStateExecuting) And tempFin) Then      finished = True    Else      tempFin = False      finished = False    End If  Next Wend  'Upon Query completion(s) build the federated recordset For i = 0 To UBound(rsArray)  rsArray(i).ActiveConnection = Nothing   If Not rsArray(i).EOF Then    rsArray(i).MoveFirst     Do While Not rsArray(i).EOF       MasterRS.AddNew       MasterRS("ObjId") = rsArray(i)("ObjId")      MasterRS("NameTagCall") = rsArray(i)("NameTagCall")      MasterRS("Location") = rsArray(i)("Location")      MasterRS("NameTagFolder") = rsArray(i)("NameTagFolder")      MasterRS("ArchiveDate") = rsArray(i)("ArchiveDate")      MasterRS("FileName") = rsArray(i)("FileName")      MasterRS.Update       rsArray(i).MoveNext    Loop  End IfNext '~~~~~~~~~~~~ Pass the RecordSet ~~~~~~~~~~~~~~~~Set Execute = MasterRS'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End Function

Graph Report In Crystal Reports 8.5 Shows Error (Automation Error. The Object Invoked Has Disconnect
Dear All,

while calling a report containing graph from VB 6.0 I found following error,

"Automation Error. The object invoked has disconnected from its clients"

but when I install crystal reports 8.5 on client machine then the error disappears.

can anybody advice?

Best Regards,Shahzad Anwar 92-345-8237099

Program Still Running After Unloading Form (maybe Object Not Disconnected)
Hi all,

I'm working in VB6 and
after the form is unloaded, the program still appears in the task manager
window. I have a few questions related to that:

1) I suppose it has to do with some object that is still in memory (didn't
disconnect it with the Set blah = nothing stuff. Am I right?

2) Is there any debugger that shows me which objects are still
alive in the memory?

3) Do I have to set to nothing the pictures in msgrid cells, that were set
through Set msflexgrid1.cellpicture = ImageList1 ...?

4) I have code of this sort
[vb]
Sub A()
Dim ppApp As Object
Set ppApp = CreateObject("Powerpoint.Application")
' Make it visible.
ppApp.Visible = True

' Add a new presentation.
'Early Binding
'Dim ppPres As PowerPoint.Presentation
'Set ppPres = ppApp.Presentations.Add

'Late Binding
Dim ppPres As Object
Set ppPres = ppApp.Presentations.Add

Present ppPres
Set ppPres = Nothing
Set ppApp = Nothing
end sub

Sub Present (pp as Object)

' do some stuff with pp
end sub

[vb]

Do I have to set pp = Nothing in the Present Subroutine before end Sub?
I assumed not because that would set the actual parameter ppPres
woul be set to nothing in the caller subroutine A. Am I right?

Thanks!! Excuse me for this long question, but I don't manage
Objects in VB.

rr.

Creating Disconnected Recordset With A Command Object Populated Recordset
    Hello!! I'm doing a function for executing stored procedures to avoid
repititive task everytime I need to execute a stored proc. I have no problem
for the function for UPDATE, INSERT & DELETE. My problem is with the stored
procedures that use SELECT statement or returns a recordset. I always
make a disconnected recordset to save resources on the server. If I use the
Open methon (rstRS.Open), I can create a disconnected recordset but when I try
to populate the record by "Set rstRS = cmd.Execute", then an error occurs.
It seems that it cannot set the recordset's active connection property to nothing
when it was populated by a command object. Are there any get around on this?

Here is my code:
-------------------------------------------------------------------------------
Code:
'this function returns a disconnected RS
Public Function GetRS(SPName As String, DBConn, ParamArray aParams()) As ADODB.Recordset
  Dim conDB As ADODB.Connection
  Dim rstRS As New ADODB.Recordset
  Dim cmd As New ADODB.Command

  ShowStat "Setting cursor . . ."
  'Create the Recordset object
  rstRS.CursorLocation = adUseClient
  
  ShowStat "Opening DBase connection . . ."
  'Open a connection
  If DBConn = "" Then
    Set conDB = New ADODB.Connection
    conDB.Open strConn
    cmd.ActiveConnection = conDB
  Else
    cmd.ActiveConnection = DBConn
  End If
  
  cmd.CommandText = SPName
  cmd.CommandType = adCmdStoredProc
  
  ShowStat "Retrieving data . . ."
  
  'Populate recordset
  If UBound(aParams()) >= 0 Then
    Set rstRS = cmd.Execute(, aParams())
  Else
    Set rstRS = cmd.Execute
  End If

  '***********************************************
  'if i used this one in populating the recordset
  'everything is fine, but the problem is that you
  'can't set the parameters needed by stored proc
  '***********************************************
  ' rstRS.Open cmd
  
  'Disconnect the Recordset Connection
   Set rstRS.ActiveConnection = Nothing <<<<<error goes here
                                                "cannot ....when the object is open"

  'Return the Recordset
  Set GetRS = rstRS

  'Clean up...
  If DBConn = "" Then
    conDB.Close
    Set conDB = Nothing
  End If
  Set cmd = Nothing
  CloseStat
  Exit Function

End Function

--------------------------------------------------------------------------------

Thanks in advance,

enzo c",)

How To Set Task,which Will Be Invoked Sometimes Later
for example, how to invoke the executable file ,such as

c:p.exe in the 25th,12 clock every month

is that right?

shell("at 12 /every:data[25] "c:p.exe" ")


Thanks

Why Doesn't Listbox_Click() Get Invoked?
Hi there,

Would appreciate advice on this...

I have a multiselect listbox called listCountries. It's enabled and not locked, and it has the checkbox style rather than the default style. When I select items in it, my listCountries_Click() function doesn't get called. I put a msgbox at the head of the function (which never opens) and I also tried setting a breakpoint - that's why I've concluded it's not getting invoked.

Any idea why this is happening?

thanks,

Rina

Has Anyone Invoked Task Manager From Within VB App?
I've tried various combinations of sendkeys control-alt-delete , but haven't got it (Task Manager) to run.

My problem is that on a couple of Win9x computers at work, we sometimes telecommute using PC Anywhere. If an app hangs, we have to try to locate someone to go to the box & ctrl-alt-del to get the task manager to pop up. In many cases, we still have acess to the mouse/keyboard from the remote PC, but we just can't do anything with it.

a Win NT/2k/XP PCA Host will accept a request from the remote PCAnywhere to do this. And, we can right-click on the task bar.

Any suggestions?

Why Is Class_Terminate Method Being Invoked?
I'm trying to convert some VBA routines in an Excel 2000 workbook to use
objects instead of global varaibles. I've defined a class module with
the following (excerpts):

(from SheetMetrics class module)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private m_HoldingSheetName As String
Private m_rngFundSymbols As Range
*
*
Option Explicit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Sub Class_Initialize()
m_HoldingSheetName = ""
*
*
End Sub
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Sub Class_Terminate() <==being invoked in error
Set m_rngFundSymbols = Nothing
End Sub
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Public Property Let SheetName(SheetID As String)
If Not SheetID = "" Then
m_HoldingSheetName = SheetID
End If
End Property
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Public Property Get SheetName() As String
SheetName = m_HoldingSheetName
End Property
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Public Property Let SymbolRange(SymbRange As Range)
Set m_rngFundSymbols = SymbRange
End Property
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Public Property Get SymbolRange() As Range
Set SymbolRange = m_rngFundSymbols
End Property
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


In a worksheet code module I attempt the following (PECategories is a
named range on the worksheet):


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dim AcctSheet(4) As SheetMetrics <== class module above

Set AcctSheet(1) = New SheetMetrics
Set AcctSheet(2) = New SheetMetrics
Set AcctSheet(3) = New SheetMetrics
Set AcctSheet(4) = New SheetMetrics

AcctSheet(1).SheetName = "PE Holdings"
AcctSheet(1).SymbolRange = Range("PECategories") <==problem
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

When the last statement above SHOULD execute, the
Class_Terminate method kicks off instead.

I'm stumped - would be grateful for any suggestions what is causing this
to happen...

Activex Dll Cant Be Invoked From Non-local Disk
Hi all,

I have created a Activex dll using Vb.6 and calling it from javascript in a html file. When the Activex dll installed on a desktop and the html file is invoked from local disk everything works fine. But when the html file is copied on to a network drive or any other computer and invked from there it gives the error
Automation server can't create object .The error number is 2146827859.

Any idead on this??

Thankx,
PVKiran

Help:Why Usercontrol Terminate Event Not Invoked
I write a activex control in vb, and I encounter a problem.
IE can normally run my activex control, but when IE shut down, an error collection msgbox appears,
And I trace the code, when run in IE, the usercontrol's Terminate event not invoked, why this happen, and how conquer it?
Appreciation for any suggestion.

Happy to be a programmer.

Avoiding A Double Instance Of Outlook When Invoked
I am running an Excel macro which invokes Outlook to send an email. I execute Outlook using the shell method.

My code works fine with one exception. If Outlook is already open, Excel opens a second instance of it. I want to avoid this.

It seems that I need a way to detect whether or not the Outlook process is already running. I have no clue how to do this.

Below is what I have (without the string variables which are loaded into the body). Can anybody offer me a way to tweak it to avoid Outlook from opening more than once?


Code:
Shell "outlook.exe"
Dim myOutlook As Object
Dim myMailItem As Object

Set otlApp = CreateObject("Outlook.Application")
Set otlNewMail = otlApp.CreateItem(olMailItem)

With otlNewMail
.To = strEmail
.CC = ""
.BCC = ""
.Subject = strSubject
.Body = strText
.Display
.Save
End With

Set otlNewMail = Nothing
Set otlApp = Nothing
Set otlAttach = Nothing
Set otlMess = Nothing
Set otlNSpace = Nothing

Thanks in advance: rlrod

Problems Accesing ODBC Database From A .dll Invoked From An .ASP.
Greetings,

I'm programming a web service using Microsoft SOAP Toolkit 3.0. My service access to a database using ODBC. The problem is that I'm unable to access the database. The service is implemented in a .dll. This .dll is invoked from an .ASP page which is accessed through IIS. I suppose the problem is related with permissions.

If I invoke the .dll directly, without passing through IIS, it works. So, It may be related with the permissions of the proccess which runs .ASP code. The ASP code instantiates a SoapServer object, which proccess the SOAP request, invoking the .dll code when necessary. I'm trying to access the database from inside this .dll code. The code which creates the workspace and connection is this:

Set wrkJet = CreateWorkspace("miWorkSpace", "Soaperos", "password", dbUseODBC)

Set db = wrkJet.OpenConnection("miConnection", dbDriverCompleteRequired, False, "ODBC;DSN=ServicioHoteles;UID=Soaperos;PWD=password")

where "Soaperos" and "password" are my username and password. This code doesn't generate errors, but when the next instruction is executed:

Set Qd = db.CreateQueryDef("")

The next error message is generated

Object type variable or With block variable is not set.


Can anyone tell me what is happening ? Thank you in advance

P.D.: The file which contains the code is enclosed with this message

Distinguishing Between User Invoked Save And Autosave In Word
I have a Word VBA project that traps the DocumentBeforeSave event to perform some validation of the document before saving.

This works great, but unfortunately the DocumentBeforeSave event also happens when Word is doing a background save or an AutoRecover save. Given that my project throws up some pretty involved dialog boxes upon the DocumentBeforeSave event, this is very disruptive for my end users.

Is there a way within a DocumentBeforeSave event handler to tell whether the save event was triggered by the user or by Word itself?

I tried checking

Application.BackgroundSavingStatus

but that doesn't seem to tell me anything unique during an AutoRecover save.

Any thoughts?

thanks
Ed

How To Suppress Active X Warning Msg When Invoked From Html Page
Hello,

I am trying to call a FileExists from vbscript. Here is the code:

Dim fso, msg
Dim Response

Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists("C:\Program Files\4C\bin\win\w4cc.exe")) Then
Response = MsgBox("Yes", 1, "Test")
Else
Response = MsgBox("Please download and install the PM application", 1, "Missing PM Application")
End If


The message:

"An ActiveX control on this page might be unsafe to intersact with other parts. Do you want to allow this interaction?"

How do I supress this error msg?

Thanks,

John

1 Server 5 Clients
Hi,
I have (as subject heading suggests) 1 server and five client PC's. The project is finished and they all connect through an ODBC. Everything works fine and each client can successfully launch its .exe file.

Howevere Im extremely new to this and need help with
a) Restricting Access to One client at a time? - Can it be done.
b) When the data is changed on One client - it changes the server but the data on other clients doesn't refresh until I reactivate or exit one page then enter it again. Can I set it so when the background database is changed that each client adjusts accordingly. - Maybe a timer or something

Any help at all, solution ideas, advice, useful links, anything would be great

What Is The Best Way To Communicate With My Clients???
I am a self tought VB hack, but im pretty good at it, so i have been told. I am working on a software package right now that is going to retrieve data from my clients computer, store it in a database on the client computer and then relay the accumulated data to a database on my server. I have little if any experience with web applications. I am wondering.... what would be the best way to go?

1. I could purchase web hosting, use ASP's to get the data, but im pretty sure the processing would be done on the web server, i think??...

2. I could build my own web server build my own web interface and still use ASP's but i would have a lot of security issuse to deal with etc...

3. I could setup VPN's with all of my clients, put a timer application on the client server to download data at a set time and then have my server retrieve the data at set times...

im sure there is 4,5,6,7..... that i dont even know about. I am only contemplating the small amount of knowledge i have been able to aquire in the last 36 hours dealing with web applications....

Any Help???

Getting Clients In Sync
Hello All! I'm making a program that will play a song on multiple computers on my network at the exact same time. What would be the best way to get them to be in sync with each other once the server sends the play message?

Clients 2d - BitBlt Or DD7?
Well I'm working on a little mmo type game... I have been working on the server and have been quite succesful so far and I'm quite excited. I just am having some debates as to how to draw the map, characters, and npcs onto the client. Would it be best to use bitblt which I have some experience with or should I learn to use Direct Draw 7? I liek the idea of not having to make a mask for every character, npc, tree, etc. If someone could give me some advice on this that would be awsome, and if your suggestion is to use DD7 then could someone show me a good tutorial or informative site.

Thanks in advance, Kyle Leonard

Chat Clients
Hi, I'm making (or attempting to make) a Chat client program- what i want is a program that will have a server/client system, and be able to connect to other people thru winsock. The only problem is, I have little or no skill in this area at all- I can code very basic things, but as for this- im not even sure where to start.

Any Tutorials or whatnaught would be greatly appreciated.






~~Kermit

Add Clients To Listbox
When people connect to my chat, I want their username to be displayed in my clientlist box. (Clientlst) Anyone have anything to start me off?

Get The Clients MAC Address
I am creating a simple program and would like to retrieve the clients Mac address on there networks card. (all the pc's running the software will have a nic)

Is this easy to do and does someone have some code on how to do it.

Many thanks

Matthew

Getting Clients Information
Hello forum.

i am creating a Client - Server project kind of like a chat room where many users can connect and chat together. I have a listbox that display list of all connected users and what I'd like to do is:

when a client (user) double click on a user in the listbox I want a messagebox to show the user's details for example (Name, Location, IP)

Does anyone know how this can be accomplished?

any response would be really appreciated as i have spent months trying to figure this out.

Clients On My Intranet
i just want 2 develop a simple mailing and chating system over an intranet, is winsock the only option 4 connecting d clients 2gether?
thanx 4 any response

VB, ActiveX, And Various Win Clients
Let me give an example, then could someone familiar with this explain to me on how to handle my problem.

Scenario:
I am using VB6 on Windows XP Pro and Office XP, my client range from Win 95 to Win2k all with Office 2k.

In a program that I am building, I want to use a Calendar Control, the one I have chosen is "MSCAL.OCX" packaged with Office XP. Now the version of the Calendar Control is different from that packaged with Office 2k. How might one get around this? Is it as simple as updating the client machines with the newer component, and if so, how could that effect other programs that use the same control?

Any ideas are helpful.

No Of Clients In C-S Application...
Hello Experts,
In a client server application developed in VB.Net, I need to connect at least 25 clients. But when the number exceeds 10 clients, it doesn't allow any more client to be connected. I have tested it in both Windows 2000 server and XP as operating system in the server and the result is same. Is there any such restriction in either of these OSs...?
Any solutions...?
Thanks in advance.
Regards, Manabesh Discover. Explore. Connect-Windows Live Spaces. Check out!

Error When App Is Run From Clients
I don't get it at all.  I installed my app on a server, and everything is fine when I run it there.  But when I try to run it from the workstations, I see run time error. The error says that this so-and-so controls are not registered.

I find this really strange 'coz all controls are registered on the server after my installation. And I definitely see some controls (like command buttons and text boxes) on the MDI form when I run my app (from the workstations).  But when I try to open those forms with SSTab, Crystal Report Control and MSHFlexGrid, there is an error.

Don't you find it strange?  Why do the command buttons, and text boxes come out OK in the MDI form? Why not the SSTab and MSHFlexGrid? Aren't they controls too like command buttons and text boxes?

My purpose is for the clients to run the application from the server so that I only have to make one installation.

I really am perplexed. I know my app's packaging is perfect coz I tried it to several computers.  Can somebody tell me what to do. I'd really appreciate it.

Many Clients On One Server?
Can there be many clients on ONE single server? If
yes how in the world do you do it? Do you need 2 winsocks or only one to handle many connections?
-- also one last thing, is there a way to always
keep the same IP address?

thanks in advance...

Copyright © 2005-08 www.BigResource.com, All rights reserved