nilesh7136's Profile User Rating: -----

Reputation: 10 Tradesman
Group:
Active Members
Active Posts:
121 (0.17 per day)
Joined:
03-January 13
Profile Views:
12,030
Last Active:
User is offline Feb 03 2014 09:38 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   nilesh7136 has not set their status

Posts I've Made

  1. In Topic: Insert/Update Error IN OleDb

    Posted 3 Feb 2014

    View PostCharlieMay, on 03 February 2014 - 09:14 AM, said:

    Typically a Generic error like this (meaning: Syntax Error in UPDATE Statement) instead of (Syntax Error in UPDATE Statement Near ...) typically occurs when an invalid column/table name is used.
    My First concern would be Password as it is typically a reserved word. Try wrapping password in [] to denote that it is indeed an object in your database instead of a keyword. I would also suspect name in some databases.

    Thank you dear,
  2. In Topic: Using BindingSource With OLEDB

    Posted 3 Feb 2014

    View Postandrewsw, on 02 February 2014 - 11:45 AM, said:

    @Charlie I found the following quote here:

    MSDN said:

    When using parameters with an OleDbCommand or OdbcCommand, the order of the parameters added to the Parameters collection must match the order of the parameters defined in your stored procedure. The .NET Framework Data Provider for OLE DB and .NET Framework Data Provider for ODBC treat parameters in a stored procedure as placeholders and apply parameter values in order. In addition, return value parameters must be the first parameters added to the Parameters collection.

    The .NET Framework Data Provider for OLE DB and .NET Framework Data Provider for ODBC do not support named parameters for passing parameters to an SQL statement or a stored procedure. In this case, you must use the question mark (?) placeholder

    (my bold) I don't think this is as clear as it could be.

    One day I'll do a quick test to convince myself ;)/>


    hey am working in that code, it's working all fine now, i have used '@Param' in Queries and working all fine...
     'Select Command
                DA_BillType.SelectCommand = New OleDbCommand("SELECT BillTypeID,BillTypeName,Remarks FROM M_BillType", ConStr_SE)
    
                'Insert Command
                DA_BillType.InsertCommand = New OleDbCommand("INSERT INTO M_BillType (BillTypeName,Remarks) VALUES(@BillTypeName,@Remarks)", ConStr_SE)
                With DA_BillType.InsertCommand.Parameters
                    '.Add("@BillTypeID", OleDbType.BigInt, 20, "BillTypeID")
                    .Add("@BillTypeName", OleDbType.LongVarChar, 201, "BillTypeName")
                    .Add("@Remarks", OleDbType.LongVarChar, 201, "Remarks")
                End With
                
                'Update Command
                DA_BillType.UpdateCommand = New OleDbCommand("UPDATE M_BillType SET BillTypeName=@BillTypeName,Remarks=@Remarks WHERE BillTypeID=@BillTypeID", ConStr_SE)
                With DA_BillType.UpdateCommand.Parameters
                    .Add("@BillTypeName", OleDbType.LongVarChar, 201, "BillTypeName")
                    .Add("@Remarks", OleDbType.LongVarChar, 201, "Remarks")
                    .Add("@BillTypeID", OleDbType.BigInt, 20, "BillTypeID")
                End With
    
                'Delete Command
                DA_BillType.DeleteCommand = New OleDbCommand("DELETE FROM M_BillType WHERE BillTypeID=@BillTypeID", ConStr_SE)
                DA_BillType.DeleteCommand.Parameters.Add("@BillTypeID", OleDbType.Numeric, 131, "BillTypeID")
    
  3. In Topic: Using BindingSource With OLEDB

    Posted 2 Feb 2014

    Thanks for that, working everything fine,, thank a lot...
  4. In Topic: Connecting To SQL Server Management Studio Error

    Posted 22 Jan 2014

    View PostDarenR, on 22 January 2014 - 11:27 AM, said:

    perhaps showing us code can help


    Am trying to Login with SQL Server Management Studio 2012,
    It's asking Server Name, Authentication type, UserID, Password....
    I have Installed SSMS but in installation not asking for any server name or username or password,
    so what is the Server name, if have to make it than how to create server, in My SQL Server Configure Manager there no any service running. Server name is Instance Name????
    am totally confused? please help me
  5. In Topic: Connecting To SQL Server Management Studio Error

    Posted 22 Jan 2014

    I have try it with machine's name, but still error

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Comments

Page 1 of 1
  1. Photo

    hetalchotaliya Icon

    23 Dec 2013 - 00:59
    using dream code i can learn more and more about the java language so
Page 1 of 1