Hi. plz tell me how I can connect to an SQL server to an microcontroller or a PC using C language....
Plz reply soon....

Re: How to Connect to an SQl server using C language 80 80

How would begin by you demonstrating that you have done something so far (say STFW) or some indication of your skill level.

There is for example no point in explaining anything about SQL if you've yet to master simple "hello world" programs in C.

Re: How to Connect to an SQl server using C language 80 80

How would begin by you demonstrating that you have done something so far (say STFW) or some indication of your skill level.

There is for example no point in explaining anything about SQL if you've yet to master simple "hello world" programs in C.

i have worked in C language ..
just needed some info as to how do i go abt in connecting to a sql server..
hav wrked in c on a beginners level...
hope u'll be able to help me out...

Re: How to Connect to an SQl server using C language 80 80

study these google links about ODBC. There are other ways depending on which SQL server you are using but ODBC is the most portable and is supported by most, if not all, SQL servers today. ODBC, as well as other methods, are somewhat complicated and accessing in c++ is a lot easier because you can get free c++ classes on the net that do most of the work.

Re: How to Connect to an SQl server using C language 80 80

Hi again..
i'll be using an sql server 2005 and a microcontroller based system.
s microcontroller does not support any other programming language than c and assembly language.
hope this information will be help u guide me...

Re: How to Connect to an SQl server using C language 80 80

I'd say you have a very big problem then. If the sql server is running on another computer (which it probably does) then your microcontroller and the hardware it runs on will have to support sockets and have a lan card, much like a pc that's connected to a network. If your microcontroller does not support that then you are SOL.

Re: How to Connect to an SQl server using C language 80 80

Ye. it will be a kit with ethernet chip n rj45 connections.therefor the tcp/ip protocols needed will be taken care of..
nw i need to program my controller using c language in a way that i can access my sql server 2005 on a remote machine...Also im trying to find out if keil compiler supports vc++, since i know that sql can be connected using this language...
plz reply...

Re: How to Connect to an SQl server using C language 80 80

So could you for example write a C program on another PC which connects to your SQL server?

Prototyping your ideas on a PC first will save you a hell of a lot of time.

Something simple, like login, retrieve a record, logout.

Since you've stated that you're only a beginner, this is going to be a lot of hard work.

I'm also going to assume that the embedded target doesn't come with the same kind of SQL library that a PC might.

Re: How to Connect to an SQl server using C language 80 80

>>Also im trying to find out if keil compiler supports vc++, since i know that sql can be connected using this language...

vc++ is NOT a computer language -- it is a compiler.

Re: How to Connect to an SQl server using C language 80 80

can anyone pls send me the code to connect sqlserver to vc++

Re: How to Connect to an SQl server using C language 80 80

Didn't you even bother to read this thread? No one here is going to write the code for you.

Re: How to Connect to an SQl server using C language 80 80

Ye. it will be a kit with ethernet chip n rj45 connections.therefor the tcp/ip protocols needed will be taken care of..
nw i need to program my controller using c language in a way that i can access my sql server 2005 on a remote machine...Also im trying to find out if keil compiler supports vc++, since i know that sql can be connected using this language...
plz reply...

Then i think most simple way to achieve this is:
1. run your own web server somewhere on net.
2. connect web server to SQL database through PHP or other methods.
3. make HTTP calls (POST/GET) from your ethernet chip to that web server.

So that is communication will be =>
your controller <-> http server <-> sql server

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.