Click to See Complete Forum and Search --> : SQL query in VC++


usingnamespace
March 23rd, 2008, 03:11 PM
I would like to use SQL query on a label click and I don't know how. So could anyone please post the code for me? I am using VC++ WinCLR.

Skizmo
March 23rd, 2008, 03:25 PM
Some info on the database you are using/going to use would be nice.

usingnamespace
March 23rd, 2008, 03:31 PM
I'm using database made in SQL Server 2005.

GCDEF
March 23rd, 2008, 04:04 PM
I don't know what WinCLR is, but you could look into CRecordset if MFC is involved.

usingnamespace
March 23rd, 2008, 04:13 PM
No, I'm making CLR Windows Forms Application.

Paul McKenzie
March 23rd, 2008, 06:55 PM
No, I'm making CLR Windows Forms Application.Sorry, this forum is for traditional C++ programming, not managed C++.

Unless what you have deals with non-managed C++, you should ask your question in the Managed C++ forum.

Regards,

Paul McKenzie

usingnamespace
March 23rd, 2008, 07:28 PM
OK, I will ask it there, but i doubt i will get any answers.

Paul McKenzie
March 23rd, 2008, 07:37 PM
OK, I will ask it there, but i doubt i will get any answers.Forums were created for a reason. Please respect those reasons.

Regards,

Paul McKenzie

usingnamespace
March 23rd, 2008, 07:43 PM
Yes I know, but i wasn't sure if it was managed or unmanaged. Now I have read about differences between them.

Paul McKenzie
March 23rd, 2008, 07:51 PM
Yes I know, but i wasn't sure if it was managed or unmanaged. Now I have read about differences between them.There is a general answer to your question, or if not an answer, a way for you to ask the question with a little more detail:

1) Do you know how to write code (regardless of the language) that is called when the Label is clicked? If not, then write that first. It doesn't matter what happens when the Label is clicked, just write the program to do that.

2) Once you get 1) done, do you know how to code an SQL Query? If not, then first learn how to code a query, regardless of whether a button is pressed.

Once you get 1) and 2), then you put the pieces of the puzzle together. Which one are you having trouble with, 1 or 2 or something else?

That is how you should have proceeded asking the question on the correct forum. Detail exactly what you can't do or have trouble doing.

Regards,

Paul McKenzie

JeffB
March 23rd, 2008, 07:56 PM
This thread is now in the Managed C++ and C++/CLI forum.

JeffB

usingnamespace
March 23rd, 2008, 08:13 PM
There is a general answer to your question, or if not an answer, a way for you to ask the question with a little more detail:

1) Do you know how to write code (regardless of the language) that is called when the Label is clicked? If not, then write that first. It doesn't matter what happens when the Label is clicked, just write the program to do that.

2) Once you get 1) done, do you know how to code an SQL Query? If not, then first learn how to code a query, regardless of whether a button is pressed.

Once you get 1) and 2), then you put the pieces of the puzzle together. Which one are you having trouble with, 1 or 2 or something else?

That is how you should have proceeded asking the question on the correct forum. Detail exactly what you can't do or have trouble doing.

Regards,

Paul McKenzie

I know both 1) and 2). When I click on a label i want that information from specific query is outputed to some other control.