|
Hello all,
I am calling the store procedure from the VC++ application and like to pass some parameters to the store procedure.
The store procedure executes correctly when i pass hard code values like
(SQLExecDirect(hStmt,(SQLCHAR*)"{call usp_SetPushCheck(1,'A','222xyz')}", SQL_NTS)
how should i pass parameter dynamically?
I am trying to use SQLBindParameter() but i am not getting the desired store procedure result thou i am also not geting any error.
can some one help me in getting correct step/code for passing three arg. as shown above dynamically?
thanks
Prasad
|
|
|
|
|
CString str;
str.Format("{call usp_SetPushCheck(%d,'%c','%s')}", 1, 'A', "222xyz");
(SQLExecDirect(hStmt,(SQLCHAR *) str, SQL_NTS)
|
|
|
|
|
I am using SQL 2000 and VC.net. I have an image field in my table together with 2 binary fields.
The first process in my app adds a jpg image to the table and the second app does some image processing
resulting in two CByteArray values which needs to be handled via the RFX_Binary call. For some reason,
calling the recordset update function I get a message "Error: field address (column %u) has changed!\n".
I tried the msdn but this just states that the bug has been fixed. Is this me making a mistake or what is going on here.
Table1.Edit();
//Initialise the m_ByteArray1 and m_ByteArray2 of Table1 whith some procedure
Table1.SetFieldDirty(&Table1.m_ByteArray1);
Table1.SetFieldNull(&Table1.m_ByteArray1, FALSE);
Table1.SetFieldDirty(&Table1.m_ByteArray2);
Table1.SetFieldNull(&Table1.m_ByteArray2, FALSE);
Table1.Update();
//Calling the above Update, assetrs with "Error: field address ...."
Please give me some direction, appreciate
|
|
|
|
|
Hello, this is probably a rather stupid question but I've been having problems with it for a couple of days...
I have to send a message over a TCP/IP conection, i.e. sockets...the message that I must send should have a header and a trailer, the message structure is this:
<esc><esc><esc><stx><message><esc><esc><esc><etx>13<null>
I found on asciitable.com that ESC, STX, and ETX have a decimal int value of 27, 2 and 3 respectively...
I have declare the array like this:
char message[]={27,27,27,2,'h','e','l','l','o',27,27,27,3};
when I compile it marks errors, how can I address ESC, STX and ETX in a char array????
|
|
|
|
|
char message[]={'\033','\033','\033','\002','h','e','l','l','o','\033','\033','\033','\003'};
the '\033' is the octal value for ESC dec 27
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
char message[] = "\0x1b\0x1b\0x1b\0x02hello\0x1b\0x1b\0x1b\0x03";
|
|
|
|
|
edujule wrote:
char message[]={27,27,27,2,'h','e','l','l','o',27,27,27,3};
when I compile it marks errors,
I get none. Please list the compiler error(s).
|
|
|
|
|
If I want to add an browse functionality in my dialog box, how can we do that??
|
|
|
|
|
What is a browse functionality?
Kuphryn
|
|
|
|
|
The usual way is to add a button with three dots (or the word "Browse"). Add a ON_BN_CLICKED message handler for the button, and within the handler call SHBrowseForFolder or CFileDialog. Search CP for examples of both.
HPS HwndSpy - GUI developer's aid to visually
locate and inspect windows. For the month of August
only, use coupon code CP-81239 for 30% off.
|
|
|
|
|
Hello!
In your dialog box, have a button where the user clicks and have that button execute this code:
void your_class_name_here::OnButtonClick()
{
CFileDialog m_file(TRUE);
CString m_value;
if(m_file.DoModal() == IDOK)
{
// get file selected
m_value = m_file.GetFileName();
UpdateData(FALSE);
}
// add whatever else you need
}
Hope that helps!
Caleb
|
|
|
|
|
and how to change font of and Titlebar of MDIChild
is there a another way than use SystemParamenterInfo()
help me .......thanks
|
|
|
|
|
I have been messing around with sockets for a while now but still can't get the code right to display ONLY the servers on a network.
How do I tell them apart from normal terminals??
Thanks.
|
|
|
|
|
What functions are you using?
Take a look at NetServerEnum()
using SV_TYPE_SERVER_NT & SV_TYPE_DOMAIN_CTRL & SV_TYPE_DOMAIN_BAKCTRL
- Anders
Money talks, but all mine ever says is "Goodbye!"
http://SourceLocker.net[^] SourceControl and DefectTracker Project.
nsms@spyf.dk <- Spam Collecting
|
|
|
|
|
Hello all,
I'm new to device programming and am pleading for somebody to help me with this problem. I own a Fujitsu N-Series Lifebook (N3010) which has an Application Panel (extra buttons for quick access to programs). I am currently trying to write a program that uses the Application Panel for specific hotkeys. Unfortunately, the only resources I have for accessing this panel is available for Linux systems (apanel.sourceforge.com), and that code is actually a device driver. I want to use the built-in device driver, but do not know how to access the device. If anybody could tell me how I am to interface with the driver and access the device, your help is greatly appreciated. Btw, I do not have the source code on the functions, defines, etc of the device driver, which is a .SYS file. Thank you!
Zero_Divide_1
|
|
|
|
|
I am trying to change the title of the MFC Window from "Untitled". Does someone know how to do this? I know that it needs to be implemented in the PreCreateWindow(cs) function. Can someone help me?
Thanks
|
|
|
|
|
Look at the SetWindowText function.
Do Lipton employees get coffee breaks?
|
|
|
|
|
You could look in your recources and add the string AFX_IDS_APP_TITLE (If you use a SDI application the name of your document is appended!)
The second thing you can do is override the PreCreateWindow() and change the value of CreateStruct.lpszName
hope this helps
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
I have tried this code segment on two different compilers receiving two different results. Using MSVC++6, the console reports that the file was not opened. C++.NET reports that the file was opened but none of the input data was displayed. What string operation do I need to use to output the contents of the file to the console?
#include iostream
#include fstream
#include string
using namespace std;
string line1;
string line2;
string line3;
string line4;
ifstream inData;
int main()
{
inData.open("data.dat");
if ( !inData) // Was file opened
{
cout<<"Could not open input file.";
return 1;
}
else
{
cout<<"File was succesfully opened"<
|
|
|
|
|
Cpudood wrote:
inData.open("data.dat");
Use the full path to the file. Without a path, the OS looks in the current directory, whatever that happens to be, and the file evidently isn't in that directory.
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Latest art~!@#2rDFA#@(#*%$Rfa39f3fqwf--=
NO CARRIER
|
|
|
|
|
I have inlcuded the data file as a part of the project workspace. I don't know if that is the current directory or not but I wouldn't know how to specify its location in the actual project.
|
|
|
|
|
If the data file is in the same folder as the app, then use GetModuleFileName() to get the app's path, lob off the app's name, and add the data file's name.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Cpudood wrote:
getline(cin, line1);
shouldn't that be
getline(inData, line1); if you are reading in from the file? cin is reading in from the console.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
2 things I can see:
1) Did you remap cin to your input stream somewhere in code that you didn't include? If not, your file could be open, but you aren't trying to read from it.
2) Where is your input file? if it is sitting in your project directory your code won't see it. You need to put the file in the Debug and Release directories - which is where your executable file is running from.
|
|
|
|
|
My View is CFormView-base class
please help me how to center MDIChildWnd in MDIFrameWnd
thanks
|
|
|
|