Recordset update looses column alias name...

Results 1 to 2 of 2

Thread: Recordset update looses column alias name...

  1. #1
    Join Date
    Dec 1969

    Default Recordset update looses column alias name...

    Hi Folks,<BR><BR>I&#039;m doing a simple SELECT on a MySQL database but aliasing a column with the AS command:-<BR><BR> .....SELECT content AS poo FROM content;<BR><BR>I open a recordset with this SQL and can happily loop thru the RS displaying the values by:-<BR><BR> = ""+RS("poo");<BR><BR>Problems arise when I try to update the Recordset:-<BR><BR> ......RS("poo") = "new value";<BR><BR>This works fine but it appears that the RS looses all notion of the &#039;poo&#039; aliased column. I make this assignment to the RS and the next time I reference this column :-<BR><BR> = ""+RS("poo");<BR><BR>I get the following error:-<BR><BR> ......Microsoft OLE DB Provider for ODBC Drivers error &#039;80004005&#039; <BR>[TCX][MyODBC]Unknown column &#039;poo&#039; in &#039;where clause&#039;<BR><BR>Has anyone experienced similar? I&#039;m actuallt doing a more complesx thing than this but the problem is ASP not being able to reference the alias name after doing an update...<BR><BR>Cheers MAT<BR>

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default Well I never do that

    so how about instead of rs("poo")<BR><BR><BR>try rs(4) where 4 will be the 4th item in your select list<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts