|
|
Again a query 'query'!!
Am i using the Delete query prop here?rather can i use it lik dis?(Hvalue is of number type in Access db)
CString hv;
_Commandptr m_pCommand;
m_pCommand=NULL;
m_pCommand.CreateInstance(__uuidof(Command));
CString strSql = _T("DELETE FROM wcs WHERE Hvalue='") +hv+ _T("')");
m_pCommand->CommandText = _bstr_t(strSql);
m_pCommand->CommandType=adCmdText;
m_pCommand->ActiveConnection = m_pConnection;
_variant_t vRecords1;
m_pCommand->Execute(&vRecords1,NULL,adCmdText);
Using the foll code..How do i retrieve the min value?how do i get to know to which record(in Access db) contains the result??(Hvalue is a number)
_Commandptr m_pCommand;
m_pCommand=NULL;
m_pCommand.CreateInstance(__uuidof(Command));
CString strSql1 = _T("SELECT MIN(Hvalue) FROM wcs");
m_pCommand->CommandText = _bstr_t(strSql1);
m_pCommand->CommandType=adCmdText;
m_pCommand->ActiveConnection = m_pConnection;
_variant_t vRecords;
m_pCommand->Execute(&vRecords,NULL,adCmdText);
|
|
|
|
|
shuchigo_jane wrote: select and delete query
Humm ... Combination of previous posts.
select[^]
delete[^]
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
v v desperate 4 an ans!!
|
|
|
|
|
shuchigo_jane wrote:
CString strSql = _T("DELETE FROM wcs WHERE Hvalue='") +hv+ _T("')");
Try strSql.Format(...) instead of direct assigning..
shuchigo_jane wrote: Using the foll code..How do i retrieve the min value?how do i get to know to which record(in Access db) contains the result??(Hvalue is a number)
_variant_t vRecords;
m_pCommand->Execute(&vRecords,NULL,adCmdText);
I think vRecords returns the results ,right??
Access the count of min as vRecords.iVal if result returning as integer.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
hey the delete worked but the select query didnt...any more suggestions!
|
|
|
|
|
shuchigo_jane wrote: hey the delete worked but the select query didnt...any more suggestions!
Try Format(...) for this also.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hello All,
Iam makeing a application of Server in which it is going to display the arrival of data.
Which then updates the database.
Can some one help me in doing so.
"Iwant to show data in EDIT BOX".
Q How to display data in EDIT BOX ?
To be more precise iam reading Inbox of a GSM sim in a GSM Modem.
Now if i use debug i get to see a new window which shows all received SMS.
e.g. AT+CMGL="ALL"
Now I want to show the same in Edit Box in a contineous loop.
just to have a visual knowledge that i have received SMS.
Rahul
Rahul
-- modified at 3:48 Tuesday 20th June, 2006
|
|
|
|
|
If you have a variable associated to your edit box and when you get the data you will have to proceed with the following steps:
CEdit::GetWindowText() from the edit window
// Code to append the text from the received to the text from edit window
CEdit::SetWindowText()
I hope I understood your question
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
You can associate two types of variables one is CONTROL(CEdit Control) and TEXT(CString value).
What Anshuman has given is with CONTROl.
You can go other way also....
when you have CString variable associated with Edit box you can directly
modify the string and call UpdateData(..) api.
Cheers
"Peace of mind through Technology"
|
|
|
|
|
Rahul321 wrote: Iam makeing a application of Server in which it is going to display the arrival of data.
Which then updates the database.
Can some one help me in doing so.
"Iwant to show data in EDIT BOX".
Q How to display data in EDIT BOX ?
Your data is arrived in the BYTE format, right??
so, you have to store it into appropriate format while receving and after set into the edit box as suggested in previous posts.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Rahul321 wrote: Can some one help me in doing so.
"Iwant to show data in EDIT BOX".
SetDlgItemText or SetDlgItemInt
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
hi, i was trying to use your program, added a push button to capture the image bitmap using imagecapture() , but i don't unsuccessful. Can you help me?
http://www.codeproject.com/audio/DXCapture.asp[^]
-- modified at 23:11 Sunday 18th June, 2006
|
|
|
|
|
You have to provide more details. What exactly didn't work?
|
|
|
|
|
I want to capture bitmap on "capture video" from "Live video" when I click button "Capture Image" on Dialog. Don't need save this bitmap. How should I do?
(note: I insert a button "Capture Image")
aloha
|
|
|
|
|
So what difficulties are you facing using the GrabFrame() and GetFrame() functions? Be specific about what you have tried and what you are trying to achieve.
|
|
|
|
|
please give me your email, I want to exchange on Email, to attach file
aloha
|
|
|
|
|
If you have a question post it here. There's no need to send me an e-mail.
|
|
|
|
|
I want code of ".OnCaptureImage" when insert button "Capture Image" on Dialog
aloha
|
|
|
|
|
You didn't answer my previous question. What difficulties are you facing with the GrabFrame() and GetFrame() functions? What have you written so far in your handler? Did you even look at his OnTimer handler?
|
|
|
|
|
I don't know useful of imagecapture() function, grabFrame() and GetFrame() are used for "Live Video" window
aloha
|
|
|
|
|
You still aren't answering my questions. And I still don't know what the problem is nor what you are trying to do.
The article presents a very unconventional way of capturing an image off a filter graph, and requires that a VMR video renderer be used. Depending on what you need, and what you can assume of the system it will be installed in, this may or may not be a good technique to use.
Ok how about this, you copy the OnTimer handler and put it in your handler.
DWORD dwSize;
dwSize=this->m_VMRCap.GrabFrame();
if(dwSize>0)
{
BYTE *pImage;
this->m_VMRCap.GetFrame (&pImage);
this->m_ctrlCaptureIMG .ShowImage (pImage);
}
|
|
|
|
|
void CDXCaptureDlg::OnCapImage()
{
DWORD dwSize;
dwSize=this->m_VMRCap.GrabFrame ();
if(dwSize>0)
{
BYTE *pImage;
this->m_VMRCap.GetFrame (&pImage);
this->m_ctrlCaptureIMG .ShowImage (pImage);
}
}
this code is used to capture a video, but I want to capture a bitmap
aloha
-- modified at 2:51 Tuesday 20th June, 2006
|
|
|
|
|
The code does not capture a video and I don't even know how you came to that conclusion. I would suggest you read the code and understand what is going on first. The code gets the current bitmap in the VMR renderer and ensures that it is in RGB24. pImage will end up as an array of RGBTRIPLEs that makes up the image. Note that he discards the bitmap header in GrabFrame() all you have is just the RGB24 data. If you want to create a HBITMAP with this, look up CreateDIBitmap on msdn.
|
|
|
|
|
Why are you posting here about a code guru article ? Code Guru should offer a place to post questions to the article author.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|