|
Hello,
I was talking of this limitation only for ODBC used to access CSV files (and maybe others)!
But fortunately, it works fine with MySQL and SQL Server (for those I already used) and probably Oracle and a lot of more DB's, else it would have a very reduced interest to use ODBC.
Because if we do SELECT to extract our data and INSERT to add them, we are obliged to UPDATE and also DELETE them ...
Look at http://support.microsoft.com/?kbid=281759
Nevertheless, I have 2 remarks for Microsoft :
1) I find to easy to say "We don't support UPDATE nor DELETE for ODBC on CSV file"
2) I would have prefered a clear message as "This SQL statement is nor supported by this ODBC driver" instead of "Bad request format" ! The 1st msg indicates clearly that it works (not) as designed, while the 2nd msg can mean that you are stupid and don't how to write a SQL UPDATE statement ...
I am lucky, my files will become soon a table under MySQL and, as they are not so big, I have been writing some dirty code to rapidly do the UDDATE.
Regards,
DD
|
|
|
|
|
Qadddd wrote:
I am lucky, my files will become soon a table under MySQL and, as they are not so big, I have been writing some dirty code to rapidly do the UDDATE.
You're on your way then. I was going to suggest importing the file into an Access table, making the modifications, then exporting the data back to a CSV file. It would have taken a few more seconds, but would have solved the problem.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Anyone who's tried using MFC's CHtmlView in VC7 has problably noticed that implementing "OnEraseBkgnd" and simply returning "TRUE" doesn't fix the "flicker" problem, as it did in the past, - (and still does with "normal" CView derived views):
<br />
BOOL CMyHtmlView::OnEraseBkgnd(CDC* pDC)<br />
{<br />
return TRUE;<br />
}<br />
You may have also noticed that your derived CHtmlView class doesn't recieve WM_ERASEBKGND messages, which is why implementing OnEraseBkgnd doesn't work.
After a few hours of trying more complicated solutions, I seem to have found a simple fix for the problem. CHtmlView implements PreCreateWindow like this:
<br />
BOOL CHtmlView::PreCreateWindow(CREATESTRUCT& cs)<br />
{<br />
cs.style |= WS_CLIPCHILDREN;<br />
return CFormView::PreCreateWindow(cs);<br />
}<br />
To fix the flicker problem, I provided my own implementation of PreCreateWindow, changing one line of code:
<br />
BOOL CMyHtmlView::PreCreateWindow(CREATESTRUCT& cs)<br />
{<br />
cs.style &= ~WS_CLIPCHILDREN;<br />
return CFormView::PreCreateWindow(cs);<br />
}<br />
After making sure the WS_CLIPCHILDREN bit wasn't set, my derived CHtmlView object started receiving WM_ERASEBKGND messages. Now, returning "TRUE" from OnEraseBkgnd works as expected in the first place.
Hope this helps someone besides me....
|
|
|
|
|
--------------------------------------
ANALOG DEVICES
AD1812js SOUNDPORT 9617 BA1226.1-1.2
MODEL AA1812
MADE IN CHINA
FCC ID: LX9UN-1812
--------------------------------------
I very wanna get the above sound card drivers for Windows 2000.
Where to get it???
Please help me!
Thank you in advance!
Rap off for you,for me,for our human.
|
|
|
|
|
Usally drivers are found at the soundcard makers website,
I Touched Osama Bin Ladens Bushy Beard
|
|
|
|
|
this is the wrong forum!
Don't try it, just do it!
|
|
|
|
|
hi all,
i do not get a meaning of this saying "subclass a window", but it's used quite often when i deal with wtl, or any other "tricky stuff"...
what does this mean???
alex
debug - is my life style
|
|
|
|
|
Basically, it means replacing the window's existing window procedure with another one (typically one you've written). This allows you to change certain aspects of the window's behaviour, while passing other events onto the original window procedure.
You might do this if, say, you wanted to trap certain keypresses in an edit control, or draw a button differently, but reuse the general behaviour of the control.
|
|
|
|
|
Hello,
I was wondering if anyone knows any site for information on using XML in Visual C++ application, e.g., I want to be able to user xml interfaces for the program layout.
Thanks in advance!
|
|
|
|
|
|
Well, thanks for the reply, but I still can't find any examples on using XML as for interface and other purposes in Visual C++ Application. Any exact URL's?
Thanks!
|
|
|
|
|
|
Thanks a lot
|
|
|
|
|
How do Isave to bitmap the DC bits?
I want to save to file the bitmap loaded to DC + the lines and text I drawed on it (on the DC).
thanks
|
|
|
|
|
Use CDC::SaveDC() for saving the context use CDC::RestoreDC() for restoring it.
Cheers!!
Siddharth
|
|
|
|
|
Thanks, but the point is I want to save it (a part of it where a bitmap was displayed and written on) as a bitmap!!
|
|
|
|
|
hi,
i am drawing a image on dialog. i tried 2 methods but seems not work.
i do sth like this at OnPaint()
void CRlscoreDlg::OnPaint()
{
if (IsIconic())
{
}
else
{
// method 1
CPaintDC pdc(this);
Graphics graphics(pdc);
int showWidth = 240;
int showHeight = 180;
Bitmap b(L"c:\\335\\image.bmp");
Image *img = b.GetThumbnailImage(showWidth,showHeight, NULL,NULL);
graphics.DrawImage(img,10,10,showWidth,showHeight);
/*
// method 2
HWND hwndStill = NULL;
// IDC_STILL is the picture box
this->GetDlgItem( IDC_STILL, &hwndStill );
RECT rc;
::GetWindowRect( hwndStill, &rc );
long lStillWidth = rc.right - rc.left;
long lStillHeight = rc.bottom - rc.top;
HDC hdcStill = ::GetDC( hwndStill );
Graphics g(hdcStill);
g.DrawImage(bb,0,0,b.GetWidth(),b.GetHeight());
*/
CDialog::OnPaint();
}
}
in method 1, the image cant be shown on startup sometimes. but, after minimize and restore it, the image appear!
in method 2, the image just cant display!
any help? ah! i am using gdi+ but i dont think it the problem.
thanks,
jim
|
|
|
|
|
In a MFC,Dialog_Based project ,I want to Know how can I get the position
(coordinate) which the user clicked on the dialog.
I don't Knw how the associated functions .I've seen the Msdn library but
There were not any example. please guide me .
THANK
|
|
|
|
|
|
CPoint cpPoint;
GetCursorPos(&cpPoint);
(SDK version)
|
|
|
|
|
Hi all. I already written a MFC application and I also got the code for a demo on the usage of cximage. Since this demo code is very long and complicated, I do not know how to use it in my currently avaliable application. Can someone advise me on how to do it. Thank you for any advise.
|
|
|
|
|
Hi to you all !!!
When i'm trying to use socket i get very often the following assertion:
"Assertion Failed on Line 851 - Sockcore.cpp"
When entering to debug the line that comes out is:
"ASSERT(pState->m_hSocketWindow!=NULL)"
Some overview of my project:
1) it has two main programs : a server that is written in VC++ 6
and a client that is written in C#.
1) The server doesn't use a static MFC library.
2) The server has some threads that uses a global tcp/ip classes,
These Tcp/IP classes ( instanses of CSocket ) protect the Send
method with a CriticalSection object, so only one thread can send somthing
to the connected clients.
These assertion can be produced repeatedly when the server is running and
the client application ( after being connected and recieving messages from the server correctly ) is debuging in a step-by-step mode.
This assertion also accours sometime while the client is running and is not in debuging mode.
I hope that some of you guys will be able to help me.
Thank you very much.
Conarius.
|
|
|
|
|
what do u mean by very often?
did u call AfxSocketInit at the program's startup routine?
...
Don't try it, just do it!
|
|
|
|
|
Yes , i have.
And "very often" is after 1 or 2 minutes of debug mode.
|
|
|
|
|
Hi every body,
I want the event(notification) of new window creation, so that I can get the handle to that window, and do whatever things I want to do with it.
I am able to get this event using sytem-wide CBT hook. But because of this sytem-wide hook I am unable to get access to functions of components which are part of OLEACC.DLL because of shareability problem.
So I want to get this event(CreateWindow) by some other way(other than global hook). If there is some work around please help.
Avya.
|
|
|
|