none
How to force the oledbCommandBuilder to generate parameters based on the column names RRS feed

  • Question

  • I know we can force  the oledbCommandBuilder to generate parameters based on the column names  Passing true for the useColumnsForParameterNames BUT  

     Generation of the parameters based on column names succeeds only if the following conditions are met:

    the point is that i dont know how and where to set or specify ; ParameterNameMaxLength ,ParameterNamePattern,ParameterMarkerFormat .

    i thinks  is in the schema  because Used by the GetSchema method to create the ParameterNameMaxLength column in the DataSourceInformationcollection.

    Thanks 

    Tuesday, November 5, 2013 5:03 PM

All replies

  • See if this works

                OleDbCommandBuilder oledbCommandBuilder = new OleDbCommandBuilder();
                oledbCommandBuilder.DataAdapter.InsertCommand.Parameters["abc"].Size = 123;


    jdweng

    Tuesday, November 5, 2013 6:24 PM
  • Hi ,

    Thanks for your posting.

    From your description, this issue is related to oledbCommandBuilder, Data Platform Development forums  forum is more suitable for it. So I move it to Data Platform Development forums  .

    Hope these help.


    Lilia Gong <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Friday, November 8, 2013 3:49 AM