libmysql.dll - fieldname of column

Just starting out? Need help? Post your questions and find answers here.
Rico
New User
New User
Posts: 7
Joined: Wed Jan 25, 2006 11:16 am

libmysql.dll - fieldname of column

Post by Rico »

Hello,

can someone please give me an example, how i can get the name of an field in mysql by using the libmysql.dll? Connection, Query etc. works and now i need the real fieldname of an column.

Thanks Rico
Manol
User
User
Posts: 11
Joined: Thu May 05, 2005 1:19 pm
Location: Spain

Post by Manol »

Please see the Resources Site:

http://www.purearea.net/pb/english/index.htm

CodeArchiv.

Databases

:D
Rico
New User
New User
Posts: 7
Joined: Wed Jan 25, 2006 11:16 am

Post by Rico »

already, i have used the example (http://www.purearea.net/pb/CodeArchiv/D ... Example.pb), but can't find the way in this example how i can get the fieldname.
Other ideas?
Manol
User
User
Posts: 11
Joined: Thu May 05, 2005 1:19 pm
Location: Spain

Post by Manol »

Yes, this is the function:

mysql_field_name

:)
Manol
User
User
Posts: 11
Joined: Thu May 05, 2005 1:19 pm
Location: Spain

Post by Manol »

Hi,

Change this code:

Code: Select all

          For i=1 To rowsNum
            *mysqlRow=CallFunction(#libmysql,"mysql_fetch_row",*mysqlResult)
            *mysqlLen=CallFunction(#libmysql,"mysql_fetch_lengths",*mysqlResult)
For this one:

Code: Select all

          Dim FieldName.s(rowsNum)
          For i=1 To rowsNum
            *mysqlRow=CallFunction(#libmysql,"mysql_fetch_row",*mysqlResult)
            *mysqlLen=CallFunction(#libmysql,"mysql_fetch_lengths",*mysqlResult)
            FieldName(i)=CallFunction(#libmysql,"mysql_field_name",*mysqlResult)
            Debug FieldName(i)
Regards,
Manolo
Rico
New User
New User
Posts: 7
Joined: Wed Jan 25, 2006 11:16 am

Post by Rico »

Compiler-Error:
Trying to write an numeric value into a string variable
in Line
FieldName(i)=CallFunction(#libmysql,"mysql_field_name",*mysqlResult)

???
Post Reply