Results 1 to 38 of 38

Thread: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

  1. #1

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Hai,

    I compiled my project created the Package using Package And Deployment Wizard.

    When i run the set up in the client machine, i am getting 3 errors. i also attach the picture of the 3 errors.
    PHP Code:
    1. Setup Error 168
        Setup has encountered a problem updating your system registry
    .

    2. Error Executing Action     
        REGSVR
    DLL Register Server failed on 'C:\ProgramFiles\Common Files\System\OLE DB\msdaps.dll

        -2147467259:UnSpecified error 
        
        with  error code - 2147467259

    3. Error while configuring ODBC drivers!
        Unable to register library C:\ProgramFiles\CommonFiles\System\OLE DB\\msdaps.dll: The operation completed 
    sucessfully. 
    After installed this setup in my machine i am able to Save new records from the installed application. But when i install the same setup in the client machine , and there i see all datas populated, but when i try to add new record then the following error is coming and the operation is cancelled.

    -2147467259
    Operation must use an updatable query


    I heard that it will happen because of the Previlleges in the shared directory, but i given FullControl to EveryOne and also to the user i install. But still this error remains.

    Also i attach the picture of the database RecordLocking setting, kindly check this and suggest me , is this error occurs because of that settings or what.


    <Edited After Testing> But also i tested by selecting [purple]None[/purple] in the [brown]Default Record Locking[/brown] Frame instead of [brown]Edited Record[/brown], even though the 3 same errors occurs when installing the setup in the client pc

    thankyou,
    Chock.
    Attached Files Attached Files
    Last edited by chockku; Jul 31st, 2005 at 01:56 AM. Reason: Text Alignment
    HAVE A NICE DAY

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    chockku,

    Check my signature for possible help.

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    What version of MDAC did you package with? What OS did you package on and what OS did you attempt to instal it on?

    For error #2 see these links.
    http://support.microsoft.com/support.../Q185/0/29.ASP
    http://www.trinet.co.uk/support/kb/Q000027
    http://www.windowsitpro.com/Article/...9534.html?Ad=1
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    chockku,


    Look here,

    Setup Error 168

    You are probably not including everything that you need in your installation package.

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Guess you added that error code recently. It wasnt there earlier.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Hi,

    Thankyou for your earlier response powerposter and moderator,

    i read the Installation Problems link given.

    The MDAC Setup version is 2.0

    The application i developed in WinXP and here all clients have WinXP with latest ServicePack updates. so i run setup in WinXP only.

    Now what i have to do , shall i reinstall MDAC and try or what, But why you have not seen my error pics. thank you for your replies.

    Thankyou,
    Chock.
    Last edited by chockku; Jul 31st, 2005 at 02:46 AM.
    HAVE A NICE DAY

  7. #7

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Hai,

    I tried with the InnoSetup, it didn't give any error in my machine, but i will try in the client machine and tell you. I seen the true type fonts in my machine, it seems that it has only 500 types of fonts, so i hope its not a problem. Anyhow tell me your suggestion, in the mean time i will try and reply you.

    thankyou,
    chock.
    HAVE A NICE DAY

  8. #8
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    chockku,

    Did you use ********** to create your Inno Setup Script? If you did not you are probably missing things in your installation.

  9. #9

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Hai,

    Thankyou for your quick responses in the Sunday - its amazing, kindly check the attached files, i am using the Inno Setup Compiler 5.1.4. Its working fine in my computer when i install, i didn't check in the user machine still. Is this the correct one what you said or not.

    I attached 2 pics, the first one is the setup wizard i start, and the second pics is the one where i attach all support file for the setup , i attach this files from the Support folder which had already contains the supporting files for this project, this Support is created before when i use Package and Deployment wizard for creating the Setup.

    But Package and Deployment Wizard adds most of our project required files to the Setup, here in Inno Setup Compiler - I think we have to do it manually, am i correct or not. Kindly reply about it.

    Thankyou,
    Chock.
    Attached Files Attached Files
    HAVE A NICE DAY

  10. #10
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    chockku,

    Just like I thought. I said to use **********, Not the Inno Setup Wizard. Words, Words, Words... They are so important for understanding. You will need to create with ********** and then send me the .iss file it creates to look at.

  11. #11

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Hai,

    I thought i was doing right , because at the end of the wizard i got the .iss file and the setup.exe. Also i installed and tried by inserting a new record its working. Any how check and tell me, i am attaching here both my setup and the .iss file. Thankyou for your replies.

    I think 11 MB is too large, so i can't attach here. can u give me ur id i will send it.

    Thankyou,
    Chock.
    HAVE A NICE DAY

  12. #12
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Chockku,

    I only asked for the .iss file. That is all I need to look at for now

  13. #13

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Hai,

    Here with i have attached the iss file. Hope this is the one you asked.


    Thankyou,
    Chock.
    Attached Files Attached Files
    HAVE A NICE DAY

  14. #14
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    chockku,

    It was not created by ********** so you maybe missing files. Look in my signature for **********. How did you get the file you have in the script.

    Send me your vbp file and your TurnAroundMaintenance.exe to your project.
    Last edited by randem; Jul 31st, 2005 at 05:58 AM.

  15. #15

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Hai,

    I downloaded the **********Setup406 from the site you specified in the morning itself, but it needs the administrator previlleges, so i searched in some other sites I forget from which site i downloaded the Inno Setup compiler. As i visited some more sites in the morning. Anyhow here with i have enclosed my Project file with the exe.

    Thankyou,
    Chock.
    Attached Files Attached Files
    HAVE A NICE DAY

  16. #16

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Hai,

    I find out the link, from where i download, but i didn't remember where i get this link, this is the place site name


    www.jrsoftware.org/download.php/is.exe
    ftp://members.aol.com/jordanrz/isetup-5.1.4.exe

    Thankyou,
    Chock.
    HAVE A NICE DAY

  17. #17
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    chockku,

    Here is the project file and iss script file I created. I don't have CR9 so there are files missing. Start with this project and add in the other fiiles and/or folders in ********** and they will be added to your script properly.
    Attached Files Attached Files

  18. #18

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Hai,

    When i run the scripfile you send. I get the following error. I have attached that with this mail. Have you seen the link i given above http://www.jrsoftware.org for downloading Inno setup 5.1.4, is it correct or not. Kindly check and tell me.

    Thankyou,
    Chock.
    Attached Files Attached Files
    HAVE A NICE DAY

  19. #19
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    chockku,

    You are not big with following instructions, huh?

    Here is the project file and iss script file I created. I don't have CR9 so there are files missing. Start with this project and add in the other fiiles and/or folders in ********** and they will be added to your script properly.

  20. #20

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Hai,

    Now i am not getting any error when installing in the Client machine,
    but when i try to SAVE or MODIFY the record i get the following error

    -2147467259

    operation must use an updatable query.

    If i try to delete then i am getting the folling error

    -2147467259
    Operation must use an updatable query.

    kindly check this and reply me, i struck with this problem for a long time.

    Thankyou,

    Chock.
    HAVE A NICE DAY

  21. #21
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    chockku,

    That problem is with your code not the installation. You will need to post your code.

  22. #22

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Hai,

    I am able to Save or Delete or Update with my user name in my machine and also tried in one more machine in network with my user name which has vb installed, but when i tried with other username who have not vb installed, he can't save or do anything , anyhow i attached the code here, pls check and reply me. the code is below

    VB Code:
    1. Private Sub cmdSave_Click()
    2. On Error GoTo ErrorHandler:
    3.  
    4.  If rst.State = 1 Then rst.Close
    5.     rst.Open "select * from Equipment where EqpName='" & Replace(Trim(txtEquipName.Text), "'", "''") & "'", cnnNew, adOpenStatic, adLockReadOnly, adCmdText
    6.     If rst.RecordCount >= 1 Then
    7.         MsgBox "Equipment Name Already Exists !", vbCritical, "* Duplicate Entry Not Allowed *"
    8.         txtEquipName.SetFocus
    9.         rst.Close
    10.         Exit Sub
    11.     Else
    12.         rst.Close
    13.         StrSql = "insert into Equipment(EqpName,Area,Plant,EffOnPlnt,Comments,EisDur,DOffDur,ShtType) Values('" & Replace(Trim(txtEquipName.Text), "'", "''") & "','" & Replace(Trim(txtArea.Text), "'", "''") & "','" & Replace(Trim(txtPlant.Text), "'", "''") & "','" & Replace(Trim(txtEffOnPlantCapacity.Text), "'", "''") & "','" & Replace(Trim(txtComments.Text), "'", "''") & "'," & Trim(txtEisDur.Text) & "," & Trim(txtDoffStr.Text) & ",'" & ShtType & "')"
    14.         cnnNew.Execute StrSql
    15.  
    16. If FlgModSubItems = True Then
    17.             IncVal = 0
    18.  
    19. If NOFRows >= 1 Then
    20.                 For IncVal = 1 To NOFRows
    21.                     StrSql = "insert into SubItems(EqpNo,EqpName,SubEqpName) values(" & ArrSprItemsa(IncVal) & ",'" & Replace(Trim(txtEquipName.Text), "'", "''") & "','" & Replace(ArrSprItemsb(IncVal), "'", "''") & "')"
    22.                     cnnNew.Execute StrSql
    23.                 Next
    24.             End If
    25.  
    26. End If
    27.  
    28. FlgArea = True: FlgComm = True: FlgPlant = True: FlgEff = True
    29.         Call ClearFields(Me)
    30.         Call LockFields(Me)
    31.         Call DisableButtons(Me)
    32.         cmdAddNew.Enabled = True
    33.         cmdModify.Enabled = True
    34.         cmdExit.Enabled = True
    35.         cmdAddNew.SetFocus
    36.         MsgBox "Record added successfully", vbInformation, "* Record Added *"
    37.         ReDim ArrSprItemsa(10) As Variant
    38.         ReDim ArrSprItemsb(10) As Variant
    39.         FlgNew = False
    40.     End If
    41.  
    42. Set rst = Nothing
    43. If rst.State = 1 Then rst.Close
    44. ErrorHandler:
    45.     ErrorHandler
    46. End Sub
    47.  
    48. Private Sub cmdUpdate_Click()
    49. Call UpdateTransactionHere
    50. If FlgModSubItems = True Then
    51.         IncVal = 0
    52. StrSql = "delete * from SubItems where EqpName='" & Replace(Trim(cmbEquipName.Text), "'", "''") & "'"
    53.         cnnNew.Execute StrSql
    54.         If NOFRows >= 1 Then
    55.             For IncVal = 1 To NOFRows
    56.                 StrSql = "insert into SubItems(EqpNo,EqpName,SubEqpName) values(" & IIf(IsNull(ArrSprItemsa(IncVal)), Null, ArrSprItemsa(IncVal)) & ",'" & Replace(Trim(cmbEquipName.Text), "'", "''") & "','" & Replace(Trim(ArrSprItemsb(IncVal)), "'", "''") & "')"
    57.                 cnnNew.Execute StrSql
    58.             Next
    59.         End If
    60.     End If
    61.  
    62. Call ClearFields(Me)
    63.     Call LockFields(Me)
    64.     Call DisableButtons(Me)
    65.     cmdAddNew.Enabled = True
    66.     cmdModify.Enabled = True
    67.     cmdExit.Enabled = True
    68.     cmdSave.Visible = True
    69.     cmdUpdate.Visible = False
    70.     cmbEquipName.Visible = False
    71.     txtEquipName.Visible = True
    72.     MsgBox "Record Updated Successfully", vbInformation, "* Record Updated *"
    73.     cmdAddNew.SetFocus
    74.     FlgMod = False
    75.     FlgModSubItems = False
    76.     RowsModifiedNow = False
    77.     NoRowsNowZero = False
    78.    
    79.     Set rsTmp = Nothing
    80.     If rsTmp.State = 1 Then rsTmp.Close
    81.  
    82. End Sub
    83.  
    84. Private Sub UpdateTransactionHere()
    85. On Error GoTo ErrorHandler
    86.  
    87. SQL = "Update Equipment set EqpName='" & Replace(Trim(cmbEquipName.Text), "'", "''") & "',Area='" & Replace(Trim(txtArea.Text), "'", "''") & "',Plant='" & Replace(Trim(txtPlant.Text), "'", "''") & "',EffOnPlnt='" & Replace(Trim(txtEffOnPlantCapacity.Text), "'", "''") & "',Comments='" & Replace(Trim(txtComments.Text), "'", "''") & "',EisDur=" & Trim(txtEisDur.Text) & ",DOffDur=" & Trim(txtDoffStr.Text) & ",ShtType='" & ShtType & "' where ID=" & ModId
    88.     cnnNew.Execute SQL
    89.  
    90. ErrorHandler:
    91.     ErrorHandler
    92. End Sub
    93.  
    94.  
    95. Private Sub cmdDelete_Click()
    96.     On Error GoTo ErrorHandler
    97.     cmbtxt = Trim(cmbEquipName.Text)
    98.     If cmbEquipName.Text = "" Then
    99.         MsgBox "Please choose the Equipment Name to Delete", vbCritical, "* Equipment Name Required *"
    100.         cmbEquipName.SetFocus
    101.         Exit Sub
    102.     End If
    103.     If rst.State = 1 Then rst.Close
    104.     rst.Open "select distinct EqpName from Equipment where EqpName='" & Replace(Trim(cmbEquipName.Text), "'", "''") & "'", cnnNew, adOpenStatic, adLockOptimistic, adCmdText
    105.     If rst.RecordCount >= 1 Then
    106.         If RsAssg.State = 1 Then RsAssg.Close
    107.         RsAssg.Open "select * from NewAssg where EqpName='" & Replace(cmbEquipName.Text, "'", "''") & "'", cnnNew, adOpenKeyset, adLockReadOnly, adCmdText
    108.         If RsAssg.RecordCount >= 1 Then
    109.             MsgBox cmbEquipName.Text & " " & "Details remains in Assignment Table" & vbCrLf & vbCrLf & " Contact System Administrator", vbCritical, "* Cannot Delete This Equipment *"
    110.             If rsTmp.State = 1 Then rsTmp.Close
    111.             If RsAssg.State = 1 Then RsAssg.Close
    112.             Set rsTmp = Nothing
    113.             Set RsAssg = Nothing
    114.             Exit Sub
    115.         End If
    116.        
    117.         If MsgBox("* Are You sure to delete all Datas for this Equipment *", vbQuestion + vbYesNo, "Delete Equipment") = vbYes Then
    118.               StrSql = "Delete * from SubItems where EqpName='" & Replace(cmbtxt, "'", "''") & "'"
    119.               cnnNew.Execute StrSql
    120.               StrSql = "Delete * from Equipment where EqpName='" & Replace(cmbtxt, "'", "''") & "'"
    121.               cnnNew.Execute StrSql
    122.               FlgArea = True: FlgComm = True: FlgPlant = True: FlgEff = True
    123.               Call ClearFields(Me)
    124.               Call LockFields(Me)
    125.               Call DisableButtons(Me)
    126.               cmdAddNew.Enabled = True
    127.               cmdModify.Enabled = True
    128.               cmdExit.Enabled = True
    129.               cmdSave.Visible = True
    130.               cmbEquipName.Visible = False
    131.               txtEquipName.Visible = True
    132.               MsgBox "Record Deleted Successfully", vbInformation, "* Record Deleted *"
    133.               cmdAddNew.SetFocus
    134.             If rst.State = 1 Then rst.Close
    135.             Set rst = Nothing
    136.            
    137.             Set rsTmp = Nothing
    138.             If rsTmp.State = 1 Then rsTmp.Close
    139.         End If
    140.     End If
    141. ErrorHandler:
    142.     ErrorHandler
    143. End Sub

    kindly check this and reply me

    thankyou,
    chock.
    HAVE A NICE DAY

  23. #23
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    chockku,

    Post your script.

  24. #24
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    chockku,

    I corrected some logic errors for one thing. Otherwise you probably left out some important database files on the computer that did not have VB installed. I need to see what you used as a script to create your install.

    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub cmdSave_Click()
    4. Dim RecordsAffected As Long
    5.  
    6. On Error GoTo ErrorHandler:
    7.  
    8. ' If rst.State = 1 Then rst.Close
    9. '    rst.Open "select * from Equipment where EqpName='" & Replace(Trim(txtEquipName.Text), "'", "''") & "'", cnnNew, adOpenStatic, adLockReadOnly, adCmdText
    10. '    If rst.RecordCount >= 1 Then
    11. '        MsgBox "Equipment Name Already Exists !", vbCritical, "* Duplicate Entry Not Allowed *"
    12. '        txtEquipName.SetFocus
    13. '        rst.Close
    14. '        Exit Sub
    15. '    Else
    16. '        rst.Close
    17.  
    18.     strSQL = "insert into Equipment(EqpName,Area,Plant,EffOnPlnt,Comments,EisDur,DOffDur,ShtType) Values('" & Replace(Trim(txtEquipName.Text), "'", "''") & "','" & Replace(Trim(txtArea.Text), "'", "''") & "','" & Replace(Trim(txtPlant.Text), "'", "''") & "','" & Replace(Trim(txtEffOnPlantCapacity.Text), "'", "''") & "','" & Replace(Trim(txtComments.Text), "'", "''") & "'," & Trim(txtEisDur.Text) & "," & Trim(txtDoffStr.Text) & ",'" & ShtType & "')"
    19.     Debug.Print strSQL
    20.     cnnNew.Execute strSQL, RecordsAffected
    21.        
    22.     If RecordsAffected = 0 Then ' Record exist or some other error!!!!!
    23.         MsgBox "Equipment Name Already Exists !", vbCritical, "* Duplicate Entry Not Allowed *"
    24.         txtEquipName.SetFocus
    25.         Exit Sub
    26.     End If
    27.    
    28. If FlgModSubItems = True Then
    29.             IncVal = 0
    30.  
    31. If NOFRows >= 1 Then
    32.                 For IncVal = 1 To NOFRows
    33.                     strSQL = "insert into SubItems(EqpNo,EqpName,SubEqpName) values(" & ArrSprItemsa(IncVal) & ",'" & Replace(Trim(txtEquipName.Text), "'", "''") & "','" & Replace(ArrSprItemsb(IncVal), "'", "''") & "')"
    34.                     Debug.Print strSQL
    35.                     cnnNew.Execute strSQL
    36.                 Next
    37.             End If
    38.  
    39. End If
    40.  
    41. FlgArea = True: FlgComm = True: FlgPlant = True: FlgEff = True
    42.         Call ClearFields(Me)
    43.         Call LockFields(Me)
    44.         Call DisableButtons(Me)
    45.         cmdAddNew.Enabled = True
    46.         cmdModify.Enabled = True
    47.         cmdExit.Enabled = True
    48.         cmdAddNew.SetFocus
    49.         MsgBox "Record added successfully", vbInformation, "* Record Added *"
    50.         ReDim ArrSprItemsa(10) As Variant
    51.         ReDim ArrSprItemsb(10) As Variant
    52.         FlgNew = False
    53. '    End If
    54.  
    55. If rst.State = 1 Then rst.Close
    56. Set rst = Nothing
    57.  
    58. ExitRtn:
    59.     Exit Sub
    60.    
    61.    
    62. ErrorHandler:
    63.     ErrorHandler
    64.     Resume ExitRtn
    65. End Sub
    66.  
    67. Private Sub cmdUpdate_Click()
    68. Call UpdateTransactionHere
    69. If FlgModSubItems = True Then
    70.         IncVal = 0
    71.         strSQL = "delete * from SubItems where EqpName='" & Replace(Trim(cmbEquipName.Text), "'", "''") & "'"
    72.         Debug.Print strSQL
    73.         cnnNew.Execute strSQL
    74.         If NOFRows >= 1 Then
    75.             For IncVal = 1 To NOFRows
    76.                 strSQL = "insert into SubItems(EqpNo,EqpName,SubEqpName) values(" & IIf(IsNull(ArrSprItemsa(IncVal)), Null, ArrSprItemsa(IncVal)) & ",'" & Replace(Trim(cmbEquipName.Text), "'", "''") & "','" & Replace(Trim(ArrSprItemsb(IncVal)), "'", "''") & "')"
    77.                 Debug.Print strSQL
    78.                 cnnNew.Execute strSQL
    79.             Next
    80.         End If
    81.     End If
    82.  
    83. Call ClearFields(Me)
    84.     Call LockFields(Me)
    85.     Call DisableButtons(Me)
    86.     cmdAddNew.Enabled = True
    87.     cmdModify.Enabled = True
    88.     cmdExit.Enabled = True
    89.     cmdSave.Visible = True
    90.     cmdUpdate.Visible = False
    91.     cmbEquipName.Visible = False
    92.     txtEquipName.Visible = True
    93.     MsgBox "Record Updated Successfully", vbInformation, "* Record Updated *"
    94.     cmdAddNew.SetFocus
    95.     FlgMod = False
    96.     FlgModSubItems = False
    97.     RowsModifiedNow = False
    98.     NoRowsNowZero = False
    99.    
    100.     If rsTmp.State = 1 Then rsTmp.Close
    101.     Set rsTmp = Nothing
    102.  
    103. End Sub
    104.  
    105. Private Sub UpdateTransactionHere()
    106. On Error GoTo ErrorHandler
    107.  
    108.     SQL = "Update Equipment set EqpName='" & Replace(Trim(cmbEquipName.Text), "'", "''") & "',Area='" & Replace(Trim(txtArea.Text), "'", "''") & "',Plant='" & Replace(Trim(txtPlant.Text), "'", "''") & "',EffOnPlnt='" & Replace(Trim(txtEffOnPlantCapacity.Text), "'", "''") & "',Comments='" & Replace(Trim(txtComments.Text), "'", "''") & "',EisDur=" & Trim(txtEisDur.Text) & ",DOffDur=" & Trim(txtDoffStr.Text) & ",ShtType='" & ShtType & "' where ID=" & ModId
    109.     Debug.Print SQL
    110.     cnnNew.Execute SQL
    111.    
    112. ExitRtn:
    113.     ExitRtn
    114.    
    115. ErrorHandler:
    116.     ErrorHandler
    117.     Resume ExitRtn
    118. End Sub
    119.  
    120.  
    121. Private Sub cmdDelete_Click()
    122.     On Error GoTo ErrorHandler
    123.     cmbtxt = Trim(cmbEquipName.Text)
    124.     If cmbEquipName.Text = "" Then
    125.         MsgBox "Please choose the Equipment Name to Delete", vbCritical, "* Equipment Name Required *"
    126.         cmbEquipName.SetFocus
    127.         Exit Sub
    128.     End If
    129.     If rst.State = 1 Then rst.Close
    130.     rst.Open "select distinct EqpName from Equipment where EqpName='" & Replace(Trim(cmbEquipName.Text), "'", "''") & "'", cnnNew, adOpenStatic, adLockOptimistic, adCmdText
    131.     If rst.RecordCount >= 1 Then
    132.         If RsAssg.State = 1 Then RsAssg.Close
    133.         RsAssg.Open "select * from NewAssg where EqpName='" & Replace(cmbEquipName.Text, "'", "''") & "'", cnnNew, adOpenKeyset, adLockReadOnly, adCmdText
    134.         If RsAssg.RecordCount >= 1 Then
    135.             MsgBox cmbEquipName.Text & " " & "Details remains in Assignment Table" & vbCrLf & vbCrLf & " Contact System Administrator", vbCritical, "* Cannot Delete This Equipment *"
    136.             If rsTmp.State = 1 Then rsTmp.Close
    137.             If RsAssg.State = 1 Then RsAssg.Close
    138.             Set rsTmp = Nothing
    139.             Set RsAssg = Nothing
    140.             Exit Sub
    141.         End If
    142.        
    143.         If MsgBox("* Are You sure to delete all Datas for this Equipment *", vbQuestion + vbYesNo, "Delete Equipment") = vbYes Then
    144.               strSQL = "Delete * from SubItems where EqpName='" & Replace(cmbtxt, "'", "''") & "'"
    145.               Debug.Print strSQL
    146.               cnnNew.Execute strSQL
    147.               strSQL = "Delete * from Equipment where EqpName='" & Replace(cmbtxt, "'", "''") & "'"
    148.               Debug.Print strSQL
    149.               cnnNew.Execute strSQL
    150.               FlgArea = True: FlgComm = True: FlgPlant = True: FlgEff = True
    151.               Call ClearFields(Me)
    152.               Call LockFields(Me)
    153.               Call DisableButtons(Me)
    154.               cmdAddNew.Enabled = True
    155.               cmdModify.Enabled = True
    156.               cmdExit.Enabled = True
    157.               cmdSave.Visible = True
    158.               cmbEquipName.Visible = False
    159.               txtEquipName.Visible = True
    160.               MsgBox "Record Deleted Successfully", vbInformation, "* Record Deleted *"
    161.               cmdAddNew.SetFocus
    162.             If rst.State = 1 Then rst.Close
    163.             Set rst = Nothing
    164.            
    165.             If rsTmp.State = 1 Then rsTmp.Close
    166.             Set rsTmp = Nothing
    167.         End If
    168.     End If
    169.    
    170. ExitRtn:
    171.     Exit Sub
    172.    
    173. ErrorHandler:
    174.     ErrorHandler
    175.     Resume ExitRtn
    176. End Sub
    Last edited by randem; Aug 2nd, 2005 at 02:13 AM.

  25. #25

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Hai,


    I hope the problem may not with the iss because its working in some machines when i try from my username. any how i attache both here.

    Hope you can be clear if you see users Access to the Directory and the Database in the Share directory. Also i check in the General Property , its not in the Read Only Mode. But it seems some what strucking in this area, but how to find out and trace this , can you please guide me.

    thankyou,
    Chock.
    Attached Files Attached Files
    HAVE A NICE DAY

  26. #26
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    chockku,

    How do you expect this to work when you don't do like I ask you to do? This script is the same as before.

    Zip your VB project and email it to me. All the support files also. NOT THE SETUP FILE!!!!
    Last edited by randem; Aug 2nd, 2005 at 02:31 AM.

  27. #27

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Hai Randem,

    sorry, just now i seen the code what u replied after correction, i didn't use that, i will try that and reply you, in the mean time check the my .iss file here in my above post. and the project attached here.

    thankyou,
    chock.
    Attached Files Attached Files
    HAVE A NICE DAY

  28. #28
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    chockku,

    You are always supposed to read from your last post to make sure you read all the new post. And you did not send the support files. This is hard when you only do part of what is needed. All your support files are needed.


    8/1/2005 10:54:30 PM - Missing crviewer9.dll
    8/1/2005 10:54:30 PM - Missing craxdrt9.dll
    8/1/2005 10:54:30 PM - Missing craxddrt9.dll
    8/1/2005 10:54:30 PM - Missing FPSPR70.ocx
    8/1/2005 10:54:30 PM - Missing Mscomct2.ocx
    8/1/2005 10:54:30 PM - Missing LVbuttons.ocx

  29. #29

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Hai ,

    You ask me to comment the code what i use to check wheter the record alread exists or not. Ok i will try it, but all are working in my machine, at the same time i am not doing this in the Update Statement, so in the client machine atleast it should work, but it didn't , anyhow i will try and reply you.

    Thankyou,
    Chock.
    HAVE A NICE DAY

  30. #30
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    chockku,

    Logic, Logic...You state yourself you do not do this in your update routine. Just what does that have to do with the save rtn? Look at the logic behind the code. And it should not work on any machine that does not have VB installed. Your installation script is really wrong. This is getting hard with not having the correct info from you.

    If I ask for A don't give me C and exclude A. That won't help! I need those files!!!!

  31. #31

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Hai,

    When i upload the file it says, the limit for the file size is 500kb, so i am not able to upload even one file, if you have give me ur mail id i will send u. i don't know what to do in this context. my id is [email protected]


    thankyou,
    chock.
    HAVE A NICE DAY

  32. #32
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    chockku,

    How many times do I need to give you the email address. It does not change each time it is used.

  33. #33

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Hi Randem,

    Thanks for your support, After i remove the line which you commented, then its working properly, i don't get any error in the installation too.

    But how you know that this line makes the error and also it will work only in the machine where VB6 is installed. Can you explain me that please.

    And also tell me what's the way to avoid the user to save the Equipment Name with the same name again, because i am keeping Equipment name and wokring similar to a primary key.

    Because i removed the code for checking whether the record with the same EqpName already exists or not.

    I hope i can put the Resolved in my next reply.

    Thankyou very much.
    Thankyou,
    Chock.
    Last edited by chockku; Aug 2nd, 2005 at 07:25 AM.
    HAVE A NICE DAY

  34. #34
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    chockku,

    It's already there in the logic. Most write to much code when simple logic will suffice. What I did was to attempt to write the record to the file. If your database will not allow duplicates because of key/index violations it will generate an error. This error will indicate either that the records already exist or that some other error happened on the insert. Just check for the duplicate error code and you have your answer.

    You still have problems with your script. DO NOT JUST MOVE ON, IT NEEDS TO BE CORRECTED. The biggest problem people have is well, it works now! Yes, but not for all cases just in this case and you don't even know why. trust me it still needs work. SO why don't you just send me those files from your support folder and let me get your script correctly done? Why is this such an effort?

  35. #35

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Hai Randem,

    Actually what you told is correct, the simple logic is suffice, but the problem is i have the primary key different, and the Equipment seperately as below

    ID AutoNumber (PK)
    EqpName Text

    Anyhow i can change the primary key to EqpName and check & protect saving thorugh the error code if it dupplicates.

    Regarding the Script, i am in the begining stage of developing the project. You can ask then 'Why you are kean about creating the Setup in the begining'. Because the user stay after 5 buildings from my place, so when i develop something new, i will compile and install every time to the user (my boss) and then he will check and tell the modfications.

    I Understand that there is some serious problems with the Script when seeing your reply here. I have to divide into several parts and then i have to mail the Files , which is in the Support Folder.

    Actually the Support Folder is the one which is automatically created when the First time I create the Setup through PACKAGE AND DEPLOYMENT WIZARD.

    Myself i thought that the same Files in Support Folder will require for compiling this project, through InnoSetup, so I added the Files when the InnoSetup Wizard runs and asks to add AdditionaFiles. Thankyou for such a reliable support. Within some time i will send the Files through mail.

    Thankyou,
    Chock.
    HAVE A NICE DAY

  36. #36
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    chockku,

    Do not change the Primary key, just and a Unique Index (No duplicates) to the field EqpName.

    Most of the files in your support folder will be added to your script but the will need to be registered and placed in the proper location.

  37. #37

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    Hai Randem,

    Yes the NoDuplicates will avoid, just after your reply i remember it now.
    We are adding the Files to the SetUp wizard, but how could we followup whether its going to register all components (files) correctly in the exact position, and first of all we need to know what's the correct location that all files to be placed. I thought the setup will do these things.

    I send the Files from the support folder did u recieved it and check the mail which and i send today.

    Thankyou,
    Chock.
    HAVE A NICE DAY

  38. #38
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Can't Save record in Client PC - When installing App - Unspecified error -2147467259

    chockku,

    I did not receive any emails from you. And what setup wizard are you using? ********** will do those thing... But there is that pesky little human factor that keeps getting in the way. You actually have to do it correctly with the correct program and the correct files. This should have been over days ago, why is it such a task?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width