|
Most likely the SQL statement is not right.
Try manually with your SQL string generated by your program and see it can insert records or not.
modified on Monday, October 12, 2009 5:25 PM
|
|
|
|
|
After reading your subsequent posts, it seems to be a string type problem. That is, ANSI/UNICODE mismatch.
Try the following;
USES_CONVERSION;
Ret = ::SQLExecDirect(StmtHandle,(SQLCHAR*)T2A((LPTSTR)(LPCTSTR)szResultant),SQL_NTS);
if(Ret != SQL_SUCCESS)
{
...
}
...
|
|
|
|
|
Dear Ozer Karaaagar,
I got it and very much thankfull to you. Let Me know one more API where it will move the Record to Specific Position. Let me know the solution to Move a Record to MoveFirst,MoveNext,MovePrevious and MoveLast. Which API must be used.
If i Have to Use ::SQLSetPos(...) API. Please give me the Steps to move to Absolute Position. Please give me the solution. It is Urgent.
Thanks & Regards,
Uday.
|
|
|
|
|
I've seen AfxMessageBox() and UpdateData() functions in your code snippet, it's a MFC project as far as I understand.
So, Why won't you use CRecordset class of MFC? It provides ODBC data access and it has got all you need (Move*() functions and a limited SetAbsolutePosition()). This will simplify your job pretty much.
Anyway, for question about Move functions;
::SQLExtendedFetch() can be used with 2nd argument should be one of the SQL_FETCH_* constants (i.e. SQL_FETCH_NEXT, SQL_FETCH_PRIOR etc.)
However, you shouldn't expect to get accurate (absolute) sequential positioning in multiuser, dynamic SQL database environments. Bookmarks can also be used for that purpose.
|
|
|
|
|
Thank u very much for ur good and valuble solution.
i am very much thank full to you.
uday.
|
|
|
|
|
Not at all! 
|
|
|
|
|
Dear Experts,
i am using following code to get account expire value.But the output only shows 100 nano seconds from jan 1 1960.
so how to
1.convert the nano seconds into seconds
2.convert the seconds into date
using visual c++
CComVariant svar;
hr =x->Get(CComBSTR("accountExpire"), &svar);
if(FAILED(hr))
{
return hr;
}
// Get the IADsLargeInteger interface.
CComPtr<iadslargeinteger> spli;
long lHigh;
long lLow;
__int64 i64;
// Get the IADsLargeInteger interface.
hr = svar.pdispVal->QueryInterface(IID_IADsLargeInteger,(LPVOID*)&spli);
if(FAILED(hr))
{
return hr;
}
// Get the high and low parts of the value.
hr = spli->get_HighPart(&lHigh);
hr = spli->get_LowPart(&lLow);
// Convert the high and low parts to an __i64.
//__int64 i64;
i64 = (ULONG)lHigh;
i64 = (i64<< 32);
i64 = i64 + (ULONG)lLow;
wprintf(L"HighPart = %u, LowPart = %u, Combined = %I64d\n",lHigh, lLow, i64);
|
|
|
|
|
raja 4 wrote: 1.convert the nano seconds into seconds
You're really asking this?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
Hello Friends,
I am trying to create one vc++ 6.0 application.
In which i have to create two application.
First application is server.
second is client.
server is running on admin user,and sending message to client.
client is getting the text sent by the admin.
client is login in different user in same computer.
########### code use in admin application #############
DWORD dwApp = BSM_ALLDESKTOPS|BSM_APPLICATIONS;
BroadcastSystemMessage(BSF_POSTMESSAGE,&dwApp,UWM_SEND,0,(LPARAM)sSend.GetAt(i));
########################################################
Now i am trying that same thing using MailSlots,
But not succeeded Yet.
So please help me.
Any guys have any idea.
Thanks in advance.
modified on Tuesday, October 13, 2009 12:38 AM
|
|
|
|
|
Not really sure if what you need to do is possible with mailslots, but check if the the client is able to get a valid handle to the mailslot. If not, check the error code.
What are you trying to do here?
Why is it that you want to change your existing working system?
«_Superman_»
I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)
|
|
|
|
|
The Application which i want to create in not completed with any method of IPC(Inter Process Communication).
So i want help for creating one vc++ application which is running in switch beetween Windows XP users, And communicate with each other.
Thanks in advance.
|
|
|
|
|
I am compiling my code on VS2008,Which was developed using VS20056.But during compilation I am getting this error.
Embedding manifest...
.\WorXTypeLib.exe.intermediate.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.
|
|
|
|
|
shilpi_gupta0708 wrote: The system cannot find the file specified.
I am pretty sure that the system cannot find the file specified. You have some choices:
1.) Copy a manifest file from another project into your current project and name it WorXTypeLib.exe.intermediate.manifest
or
2.) Right click on the project and choose 'Manifest Tool' from the treeview on the left side. Update or remove the manifest from the project.
Best Wishes,
-David Delaune
|
|
|
|
|
Does this help?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi ,Thanks for the reply.But it has the mainfest file at the place , But still not able to load.
Thanks
Shilpi
|
|
|
|
|
need help on minix, does minix 3 support unicode, i was trying to customize its user interfrce. any help will be appreciated
|
|
|
|
|
This forum is for C/C++/MFC questions. You could ask your query on the minix support forum.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
need help how to compile minix 3 using code block 8.2
|
|
|
|
|
i'm trying to learn how to compile it in Visual C++ 2008 Express Edition.
|
|
|
|
|
Hi,
Can anyone please help me to build a graph for input over network using directshow library in C++.
Pritee Kolhatkar
|
|
|
|
|
You should ask a bit more specificly...what exactly do you need help with?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Hi,
I would like to create a COM application using VC++6.0 wherein I require the complete screen to be captured using the PrintScreen (VK_SNAPSHOT) functionality and the output to be printed out (send to Printer). I could use the keyboard event with VK_SNAPSHOT but I failed to send it to the Printer.
Would you be able to advice how to progress here?
With Regards,
Abraham Chethuvelil
|
|
|
|
|
Arun Abraham Jose wrote: I could use the keyboard event with VK_SNAPSHOT but I failed to send it to the Printer.
What is failing (i.e. please post the relevant code)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Arun Abraham Jose wrote: ...I require the complete screen to be captured...
Does this help?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|