in

System.Data.SQLite

An open-source, enhanced version of the SQLite database engine for Windows

cmd.Parameters.Add(string, object) has been deprecated

Last post 09-16-2005 4:38 PM by MyGeneration. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 09-15-2005 7:30 PM

    cmd.Parameters.Add(string, object) has been deprecated

    We releasing testing our dOOdads .NET architecture against your new 2.0 driver and noticed one thing:


    private void AddParameter(SQLiteCommand cmd, string paramName, object data)
    {
    #if(VS2005)
     cmd.Parameters.AddWithValue(paramName, data);  
    // Not in the SQLite 2.0 Driver
    #else
     cmd.Parameters.Add(paramName, data);
    #endif
    }

    That's how I have to do this in my code, a few drivers (we support 8 DBMS systems) haven't make this change.

    Mike Griffin
    MyGeneration Software
    http://www.mygenerationsoftware.com

     

     

     

  • 09-15-2005 11:25 PM In reply to

    Re: cmd.Parameters.Add(string, object) has been deprecated

    That's because its been introduced since beta 2.  VS2005 Team Suite Edition Release Candidate has been posted for MSDN subscribers and I've downloaded it, but this RC doesn't have a Go Live license like beta 2 did.  I'll probably be making a 1.19 shortly with it anyway.  Beta 2 users can continue to use 1.18.

    Robert

     

     

  • 09-16-2005 10:54 AM In reply to

    Re: cmd.Parameters.Add(string, object) has been deprecated

    I did some further digging.  This function isn't part of DbParameterCollection, so it's pretty much optional.  I've implemented it, but generic designers coding for a multitude of database engines shouldn't depend on it.

    Robert

     

  • 09-16-2005 4:38 PM In reply to

    Re: cmd.Parameters.Add(string, object) has been deprecated

    Well, the thing is when you compile against that method it specifically tells you it's been deprecated and to use AddWithValue, it must be in some kind of spec?  Anyway, keep up the good work. Have you ever had a chance to look at our .NET architecture, it does a good job of supporting SQLite. 
Page 1 of 1 (4 items)
Powered by Community Server (Commercial Edition), by Telligent Systems