|
Hi friends,
I use above class and CDaoRecordset for writing into xls file. I set one button. on button event, i write following code
CString Sql,Name,Addr;
GetDlgItemText(IDC_NAME,Name);
GetDlgItemText(IDC_ADDRESS,Addr);
db.Open("Pis.xls");
Sql = "SELECT * FROM Pis";
recset.Open(CRecordset::forwardOnly,Sql,NULL);
recset.AddNew();
recset.SetFieldValue("Name",(LPCSTR)Name);
recset.SetFieldValue("Addr",(LPCSTR)Addr);
recset.Update();
recset.Close();
db.Close();
}
when I enter name and address and click on button, error message come
could'nt open database. unrecognise database format
friend kindly give me a reply. why i am not able to write and read data from xls
Regards
kedar
Girish
Software Developer
|
|
|
|
|
did you specify the pis.xls path correctly? pls check the path of the xls file i mean db.open("path\\pis.xls") give path correctly and i hope it works correctly.
cheers,
uday.
uday kiran
|
|
|
|
|
I have added a new interface(using dispinterface) in odl file. Now how do I check whether the activex control register has the new interface or not. ?
Will "AfxOleRegisterTypeLib" will register all the interfaces existing in the library ? What if old library is register and I am to use new methods in new interfaces ?
Any help on it.
Best Regards,
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg."
- Bjarne Stroustrup
|
|
|
|
|
hi,
i want to send a singnal to another application thru socket and make a video(mpeg) file play.. wat r the steps i need to do to play the file
there is always a tomorrow
|
|
|
|
|
When the another application receives the signal, use ShellExecute function
nave
|
|
|
|
|
i'm a beginner,can u elaborate on that please..
there is always a tomorrow
|
|
|
|
|
I said the process to start playing a file after the second application have got the signal for the same( I think u have accomplished that task. isn't it? )
So when ur application receive the signal, use the ShellExecute api.See the help..
ShellExecute(NULL,_T("open"),"wmplayer.exe",csPath,NULL,SW_SHOW);
here the csPath should specify the path of file to play
nave
|
|
|
|
|
hi naveen,
thanks. i was able to open the wmplayer using ur code. the file does not play automatically. i gave full path of the file.. anyway i'll try it out.
there is always a tomorrow
|
|
|
|
|
i tried it out.. Its working here...I hope the problem is with the path u give.
if u r giving a path hard code in the program, Please note the point marked bold below ..
ShellExecute(NULL,_T("open"),"wmplayer.exe","c:\film\cut1.mpg",NULL,SW_SHOW); // will not work
ShellExecute(NULL,_T("open"),"wmplayer.exe","c:\\film\\cut1.mpg",NULL,SW_SHOW); // will work
good luck
nave
|
|
|
|
|
hi,
thank u so much its working
there is always a tomorrow
|
|
|
|
|
Hi,
Currently I am working on the printing issues.To break a lengthy string into multiple lines I am using DT_WORDBREAK.It works fine when the string contains spaces.But the problem arises when the string contains no spaces.When the string contains no spaces and if DT_WORDBREAK is used.....the string is getting clipped.Is there any way to overcome this problem still using the DT_WORDBREAK or is there any other alternative.
Taruni
|
|
|
|
|
add DT_EDITCONTROL style also
nave
|
|
|
|
|
What is the difference b/w function overloading and function overriding??
|
|
|
|
|
Function overloading: it is when you have two function with the same name but different arguments in the same scope. For example:
void Func1(int, int);
void Func1(float, float);
Depending of the type of the arguments that will be supplied to the function, the corresponding one will be called.
Function overriding: it is when you have a base class that defines a function and this function is redefined in an inherited class. This is usefull for providing a different behavior between the base and the child class.
|
|
|
|
|
I have read that "C++ is employs type-safe linking to enable function overloading"
what is the meaning of type safe? and
what is the meaning of type safe according to this context?
plz guide me.
krishna
krishna
|
|
|
|
|
|
How to store and retrive the metafile information from file
|
|
|
|
|
What kind of metafile? Windows Metafile?
Please be more specific in your post.
|
|
|
|
|
Hello friends,
I have been asked to Find out the new manifest method of Visual Studio 2005 and implement the manifest in my project ,and test it on different themes.
any one please suggest me some references that could help me.
Thank u!!!
|
|
|
|
|
Hi guys,
I'm building a simple mail program, and I want to send mail to an address but I am having a few issues with the authentication.
I'll use telnet in my discussion because its easier but I'm doing this in VC++.
Basically the smtp server I am using is:
smtp.gmail.com port 587 (Yes i know its not 25, but google requires this for TLS). Here is what i input into telnet:
220 mx.gmail.com ESMTP e14sm234337qba
ehlo server
250-mx.gmail.com at your service
250-SIZE 20971520
250-8BITMIME
250-STARTTLS
250 ENHANCEDSTATUSCODES
starttls
220 2.0.0 Ready to start TLS
auth login
Connection to host lost.
You can see after I put in AUTH LOGIN, I get disconnected.
My question is, after i enter the command STARTTLS, how do i enter my login information and the corresponding mail commands (MAIL FROM:, RCPT TO: etc.)?
If I have to some how incorporate SSL into sending commands how would I do that using C++?
I looke allllll over google and other places but couldnt find an answer. Any help would be appreciated. Thanks guys!
Robbie
|
|
|
|
|
hi capricious_001
you can check http://www.codeproject.com/internet/csmtpconn.asp[^]
The Program is not through Telnet but it's a simple implementation to send mails using SMTP.
Hope it helps....
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
Hey quickdeveloper,
Thats a really neat program, and I'm actually looking at using that. What I really like is that its REALLY clean and well documented... meaning it took me only a few seconds to realize whats going on and i'm a newbie programmer.
The only problem is that you need to have access to an SMTP server that has no authentication whatsoever and doesnt use SSL.
lol you wouldnt know of any SMTP Servers that don't have any authentication or use SSL would you? :P
Thanks for the script btw
Robbie
|
|
|
|
|
I debug a program with break points. I checked variable values all O.K.
Suddenly I got error message: Unhandled exception in Data.exe, OXC00000FD, Stack Overflow
WHat is the problem ? how to fix it?
|
|
|
|
|
Most likely you've got recursion that is too deep. i.e.
void Foo()
{
Foo();
}
Steve
|
|
|
|
|
Thanks Steve. It looks like I solved the problem by reduce the size of arrays in the program.
However, now I got "unhandled exception, 0xC0000005 access violation"
Please help thanks
|
|
|
|