Whenever i try to access www.demonoid.com I get a blank screen!? YouTube - Monitoring Lit’l Servers
Jun 22

Hello guys,

I am making a program in VB as frontend and Sql2000 as Backend.
Now i have a form to add new employee in the database. There is a button on the form as Add. After filling all the fields in the form when the user clicks on Add it should be added in the Employee table in the database. This is the code that i am using to add the record:

Private Sub add_Click()

emp.Recordset.AddNew Array(”emp_no”, “f_name”, “l_name”, “designation”, “emp_image”), Array(Val(Text1), Text2, Text3, Combo1.Text, strpath)

End Sub

Here 'emp' is name of the ADODC component. It is already connected to the database and to the employee table.
Now when i run it and after entering records this is the error i get:

Run-time error '-2147217887 (80040e21)':
Multiple-step operations generated errors. Check each status value.

I am stuck up and cant go ahead with my project.

Please i request you to help me soon.

Thanking you.

 Mail this post

StumbleUpon It!

Related Posts

No related posts

One Response to “Help required in VB. Please help me fast? India”

  1. admin Says:
    it looks like a value type issue - try changing the value type.

    and Check the data of Table emp also

    To work around this problem, use one of the following methods:
    Do not use the "Persist Security Info" keyword in your ADO connection string.
    Add the OLEDB_SERVICES registry entry as follows:

    Note Only create the OLEDB_SERVICES value in the registry keys of providers that support COM aggregation. The Exchange OLE DB provider does not support COM aggregation, and when you create this values, you receive the following error message:
    0×80040E22
    Non-NULL controlling IUnknown was specified, and either the requested interface was not IUnknown, or the provider does not support COM aggregation.

    Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
    322756 (http://support.microsoft.com/kb/322756/ ) How to back up and restore the registry in Windows
    Start Registry Editor.
    In the registry under HKEY_CLASSES_ROOTCLSID, find the CLSID of the OLE DB provider. For example, the following registry key is for the Microsoft OLE DB Provider for SQL Server (SQLOLEDB):
    HKEY_CLASSES_ROOTCLSID{0C7FF16C-38E3…
    Click the CLSID, and then on the Edit menu, click Add Value and add the following registry value:
    Value Name: OLEDB_SERVICES
    Data Type: REG_DWORD
    Value: 0xFFFFFFFF

    Note To find the CLSID for the provider you are using, search for the provider's ProgID (SQLOLEDB, for example) in the registry under HKEY_LOCAL_MACHINESOFTWAREClasses. Under the ProgID, there will be a key named CLSID.
    If these conditions are satisfied and you still receive the error, examine your connection string for other possible errors.
    Back to the top
    MORE INFORMATIONSteps to reproduce the behaviorPaste the following code in a Microsoft Visual Ba…Steps to reproduce the behavior
    Paste the following code in a Microsoft Visual Basic Standard EXE project, set a Project Reference to Microsoft ActiveX Data Objects, and then run it. The error occurs if you use the DTSFlatFile provider or any OLE DB provider that does not support one of the properties in the connection string, such as "Persist Security Info".
    Private Sub Command1_Click()

    Dim cn As New Connection

    cn.Open "Provider=DTSFlatFile;Persist Security Info=True;" & _
    "Data Source=Mysql;Mode=Read;File Format=0;File Type=1;" & _
    "Skip Rows=0;First Row Column Name=False;Number of Column=0;" & _
    "Max characters per delimited column=255;" '<—— Error Occurs Here

    End Sub

Leave a Reply