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.
Printable View
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.
Some info on the database you are using/going to use would be nice.
I'm using database made in SQL Server 2005.
I don't know what WinCLR is, but you could look into CRecordset if MFC is involved.
No, I'm making CLR Windows Forms Application.
Sorry, this forum is for traditional C++ programming, not managed C++.Quote:
Originally Posted by usingnamespace
Unless what you have deals with non-managed C++, you should ask your question in the Managed C++ forum.
Regards,
Paul McKenzie
OK, I will ask it there, but i doubt i will get any answers.
Forums were created for a reason. Please respect those reasons.Quote:
Originally Posted by usingnamespace
Regards,
Paul McKenzie
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:Quote:
Originally Posted by usingnamespace
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
This thread is now in the Managed C++ and C++/CLI forum.
JeffB
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.Quote:
Originally Posted by Paul McKenzie