dbTalk Databases Forums  

MySQL connection Issue

comp.databases.mysql comp.databases.mysql


Discuss MySQL connection Issue in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
shamma al eisaei
 
Posts: n/a

Default MySQL connection Issue - 04-05-2011 , 11:42 AM






Hello everybody,

I’m working on “the CCS RFID Development Kit” which used PIC C
compiler. And I trying to establish a connection between the compiler
and MySQL but it didn’t work… its give errors on the included files
which named “string.h” and I have no idea how to connect to the
database by using C language.


Could anyone help..??

Reply With Quote
  #2  
Old   
The Natural Philosopher
 
Posts: n/a

Default Re: MySQL connection Issue - 04-05-2011 , 12:39 PM






shamma al eisaei wrote:
Quote:
Hello everybody,

I’m working on “the CCS RFID Development Kit” which used PIC C
compiler. And I trying to establish a connection between the compiler
and MySQL but it didn’t work… its give errors on the included files
which named “string.h” and I have no idea how to connect to the
database by using C language.


Could anyone help..??

Sounds like a generic c library issue rather.

What operating system is this?

If Linux, you will need to install many development packages that
contain the header files.



Oh, I see what a CCS RFID Development Kit is. Mmm.

What exactly are you trying to do? I think this is more than a simple
query (ha ha)

Reply With Quote
  #3  
Old   
Axel Schwenke
 
Posts: n/a

Default Re: MySQL connection Issue - 04-05-2011 , 12:57 PM



shamma al eisaei <shamma.aleisaei (AT) gmail (DOT) com> wrote:

Quote:
I'm working on the CCS RFID Development Kit which used PIC C
compiler. And I trying to establish a connection between the compiler
and MySQL but it didn't work its give errors on the included files
which named string.h and I have no idea how to connect to the
database by using C language.
You actually have two problems.

First you are trying to compile the MySQL C client library aka
Connector/C for your target platform. This requires a compiler
and runtime environment (libc) that is compatible with the POSIX
standard. I.e. the "string.h" header is part of POSIX.

See: http://en.wikipedia.org/wiki/POSIX and
http://en.wikipedia.org/wiki/C_standard_library

Second you want to learn how to use Connector/C. You should RTFM:

http://dev.mysql.com/doc/refman/5.1/en/connector-c.html


But looking at http://www.ccsinfo.com/product_info....cts_id=RFIDkit
it seems you have lost already. In order to access a remote MySQL
server, your platform must support TCP. While it would be possible
to use the RS-485 interface on those prototype boards for networking,
I doubt you will be able to fit a TCP stack + MySQL client + RFID App
into a PIC16 target (the PIC16F876 has 8K words program memory).

I guess the best course is to invent your own protocol and connect the
RFID board via RS-485 with some application running on more potent
hardware (a PC?). This application could then connect to MySQL.


XL

Reply With Quote
  #4  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: MySQL connection Issue - 04-05-2011 , 02:48 PM



Axel Schwenke wrote:

Quote:
shamma al eisaei <shamma.aleisaei (AT) gmail (DOT) com> wrote:
I'm working on the CCS RFID Development Kit which used PIC C
compiler. And I trying to establish a connection between the compiler
and MySQL but it didn't work its give errors on the included files
which named string.h and I have no idea how to connect to the
database by using C language.

[…]
But looking at http://www.ccsinfo.com/product_info....cts_id=RFIDkit
it seems you have lost already. In order to access a remote MySQL
server, your platform must support TCP. While it would be possible
to use the RS-485 interface on those prototype boards for networking,
I doubt you will be able to fit a TCP stack + MySQL client + RFID App
into a PIC16 target (the PIC16F876 has 8K words program memory).
Not that it must alleviate the problem at hand, but I do wonder where you
got the "8K words program memory" from. AFAICS, the description for this
RS485 Prototyping Board says it features a _PIC16F628A_ chip, and a Web
search for that yields
<http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010210> which
says that it has _3.5 KB_ Flash program memory.

--
PointedEars

Reply With Quote
  #5  
Old   
Axel Schwenke
 
Posts: n/a

Default Re: MySQL connection Issue - 04-05-2011 , 03:44 PM



Thomas 'PointedEars' Lahn <PointedEars (AT) web (DOT) de> wrote:
Quote:
Axel Schwenke wrote:

I doubt you will be able to fit a TCP stack + MySQL client + RFID App
into a PIC16 target (the PIC16F876 has 8K words program memory).

Not that it must alleviate the problem at hand, but I do wonder where you
got the "8K words program memory" from. AFAICS, the description for this
RS485 Prototyping Board says it features a _PIC16F628A_ chip
I feel like James T. - asking you to shut up and/or use
your imagination.

Look closer!

The kit contains the RFID board with a label "PIC16F876"
and the RS-485-to-RS-232-converter board with the 16F628.

For a networked project, you would not use the converter
board at all. But you could replace that board with some-
thing more beefy (preferrably with onboard Ethernet) and
connect that to MySQL.


XL

Reply With Quote
  #6  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: MySQL connection Issue - 04-06-2011 , 03:49 AM



Axel Schwenke wrote:

Quote:
Thomas 'PointedEars' Lahn <PointedEars (AT) web (DOT) de> wrote:
Axel Schwenke wrote:
I doubt you will be able to fit a TCP stack + MySQL client + RFID App
into a PIC16 target (the PIC16F876 has 8K words program memory).
Not that it must alleviate the problem at hand, but I do wonder where you
got the "8K words program memory" from. AFAICS, the description for this
RS485 Prototyping Board says it features a _PIC16F628A_ chip

I feel like James T. -
Kirk? ;-)

Quote:
asking you to shut up and/or use your imagination. […]
I did not know that imagination was required around here. I have asked a
question because something was unclear to me (sorry if it lacked a quotation
mark). Thank you for the clarification, despite the unnecessarily
condescending way in which it was provided.

--
PointedEars

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.