title: ADODB PHP MS-SQL SERVER SAVE() problems
body: <p>after a lot of research I can connect ADOBD mssql y free tds, but now I have another problem, I tried to use Active record , an insert intruction  but I can't do it, the ado didn't send me any errors... this is my script:</p>
  
  <pre><code>include('adodb/adodb.inc.php');
  include('adodb/adodb-active-record.inc.php');
  
  $db = ADONewConnection('mssql'); # eg 'mysql' or 'postgres'
  $db-&gt;Connect('*********', "*********", '**********', "**********");
  ADOdb_Active_Record::SetDatabaseAdapter($db);
  ADODB_Active_Record::$_changeNames = FALSE;
  $db-&gt;debug = true;
  #the following example use a table that was created with this statement
  $rs = $db-&gt;Execute("select top 3 * from banks order by 1 desc");
  print "&lt;pre&gt;";
  print_r($rs-&gt;GetRows());
  print "&lt;/pre&gt;";
  #create an empty class to work with our new table
  class banks extends ADOdb_Active_Record {}  $banks2 = new banks();
  $banks2-&gt;desc_bank = 'Banco '.date("H:i:s d/m/Y");
  $banks2-&gt;save(); // this save() will fail on INSERT as favorite_color is a must fill...
  
  echo "&lt;br/&gt; Guarde: el id = '$banks2-&gt;id_bank - $banks2-&gt;desc_bank ".date("H:i:s d/m/Y")."'";
  $ok = $banks2-&gt;Save();
  
  if (!$ok) $err = $banks2-&gt;ErrorMsg();
  echo "&lt;br&gt; Error= $err";
  unset($banks);
  // $rs = $db-&gt;Execute("insert into banks values('".'Banco '.date("H:i:s d/m/Y")."')");
  $rs = $db-&gt;Execute("select top 3 *  from banks order by 1 desc");
  print "&lt;pre&gt;";
      print_r($rs-&gt;GetRows());
  print "&lt;/pre&gt;";
  echo "&lt;br/&gt; Acabe: ".date("H:i:s d/m/Y");
  </code></pre>
  
  <p>If I uncomment the normal insert it did, but that's not Active record</p>
  
  <pre><code>This is the response:
  
  &gt; (mssql): select top 3 * from banks order by 1 desc  
  
  Array
  (
      [0] =&gt; Array
          (
              [0] =&gt; 26
              [1] =&gt; Banco 10:54:29 26/04/2012     
          )
  
      [1] =&gt; Array
          (
              [0] =&gt; 25
              [1] =&gt; Banco 10:54:18 26/04/2012     
          )
  
      [2] =&gt; Array
          (
              [0] =&gt; 23
              [1] =&gt; BANSEFI 2                     
          )
  
  )
  
  (mssql): select c.name,t.name,c.length,c.isnullable, c.status, (case when c.xusertype=61 then 0 else c.xprec end), (case when c.xusertype=61 then 0 else c.xscale end) from syscolumns c join systypes t on t.xusertype=c.xusertype join sysobjects o on o.id=c.id where o.name='banks'   (mssql): select distinct k.column_name,ordinal_position from information_schema.key_column_usage k, information_schema.table_constraints tc where tc.constraint_name = k.constraint_name and tc.constraint_type = 'PRIMARY KEY' and k.table_name = 'banks' and k.table_catalog like 'tss_dev%' order by ordinal_position   (mssql): INSERT INTO banks(id_bank,desc_bank) VALUES (?,?)   [ (0=&gt;null) (1=&gt;'Banco 11:05:42 26/04/2012') ] sp_executesql N'INSERT INTO banks(id_bank,desc_bank) VALUES (@P0,@P1); select SCOPE_IDENTITY()',N'@P0 CHAR, @P1 NVARCHAR(25)',@P0=NULL, @P1=N'Banco 11:05:42 26/04/2012'
  (mssql): select SCOPE_IDENTITY()   (mssql): select max(id_bank) from banks  
  Guarde: el id = '26 - Banco 11:05:42 26/04/2012 11:05:42 26/04/2012'
  Error= (mssql): select top 3 * from banks order by 1 desc  
  
  Array
  (
      [0] =&gt; Array
          (
              [0] =&gt; 26
              [1] =&gt; Banco 10:54:29 26/04/2012     
          )
  
      [1] =&gt; Array
          (
              [0] =&gt; 25
              [1] =&gt; Banco 10:54:18 26/04/2012     
          )
  
      [2] =&gt; Array
          (
              [0] =&gt; 23
              [1] =&gt; BANSEFI 2                     
          )
  
  )
  
  
  Acabe: 11:05:42 26/04/2012
  </code></pre>
  
  <p>And this is the Table banks</p>
  
  <pre><code>    USE [tss_dev]
  GO
  
  /****** Object:  Table [dbo].[banks]    Script Date: 26/04/2012 11:17:08 ******/
  SET ANSI_NULLS ON
  GO
  
  SET QUOTED_IDENTIFIER ON
  GO
  
  SET ANSI_PADDING ON
  GO
  
  CREATE TABLE [dbo].[banks](
      [id_bank] [smallint] IDENTITY(22,1) NOT NULL,
      [desc_bank] [char](30) NOT NULL,
   CONSTRAINT [PK_banks_id_bank] PRIMARY KEY CLUSTERED 
  (
      [id_bank] ASC
  )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  ) ON [PRIMARY]
  
  GO
  
  SET ANSI_PADDING OFF
  GO
  
  EXEC sys.sp_addextendedproperty @name=N'MS_SSMA_SOURCE', @value=N'tss_sales_demo.banks' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'banks'
  GO
  </code></pre>
  
  <p>Thanks for you help Guys..!!!</p>