https://foro.gambas-es.org/viewtopic.php?f=4&t=38&p=9554#p9554
-----------------------------------
Miguel1813
Miercoles, 01 Junio 2011, 21:29

Re: El Control Dataview
-----------------------------------
Tengo un datasourse y un dataview, los he utilizado en postgres y corren bien, cuando los utilizo con mysql 5 me da un error: query failed;you have an error in your sql syntax check the manual that corresponds to your MYSQL server version for the right syntax to use near ' from SCestados where (cod_edo='01') limit 64 at line 1
 
la sintaxis que utilizo es la siguiente:
TRY $hConn.Close
  $hConn = NEW Connection
  WITH $hConn
    .Type = "MySQL"
    .Host = "localhost"
    .Login = "root"
    .Password = "mike2000"
    .Name = "mysql"
  END WITH
 $hConn.Open

  DataSource1.Table = "SCestados" 
   DataSource1.filter = "cod_edo='" & xcod & "'"   [color=#ff0000] 'aqui me da el error[/color]
  DataSource1.ReadOnly = FALSE
  DataView1.Grid = TRUE
  WITH DataView1.GridView
   .columns[0].text = "Cod. Edo"
   .columns[0].width = 100
   .columns[1].text = "Cod. Mun"
   .columns[1].width = 100
  END WITH
 DataSource1.Refresh

la tabla tiene indice primario


