table name from db object result

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

table name from db object result

PICCORO McKAY Lenz
in sqlite or odbc how can extrat the table name, due i try to autodetect
the field name from a result:

For indexcol = 0 To rsObj.Fields.Count - 1
      rsObj.Fields[indexcol].Name
next

but in sqlite case i get string: "tablename.colname" event "colname"

so there's some property or method that can showme the table,

NOTE: i know that i made the select so the tablename must be.. but there's
another way? its for a dataexporter between databases

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: table name from db object result

PICCORO McKAY Lenz
i found that:

        namcol = Split(rsObj.Fields[indexcol].Name, ".")
        gridproductos.Columns[indexcol].Title = namcol[1]

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com

2017-05-22 15:24 GMT-04:00 PICCORO McKAY Lenz <[hidden email]>:

> in sqlite or odbc how can extrat the table name, due i try to autodetect
> the field name from a result:
>
> For indexcol = 0 To rsObj.Fields.Count - 1
>       rsObj.Fields[indexcol].Name
> next
>
> but in sqlite case i get string: "tablename.colname" event "colname"
>
> so there's some property or method that can showme the table,
>
> NOTE: i know that i made the select so the tablename must be.. but there's
> another way? its for a dataexporter between databases
>
> Lenz McKAY Gerardo (PICCORO)
> http://qgqlochekone.blogspot.com
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Loading...