|
|
Hi All
I am useing Microsoft Excel Driver for creating a database (i.e. Excel sheet).it's working only for .xls formate.But it's not create for .xlsx formate.Code is here
GetDlgItemText(IDC_EDIT1,m_getfilename);
CDatabase database;
CString sDriver="Microsoft Excel Driver(*.xls, *.xlsx, *.xlsm,*.xlsb)";
CString sExcelFile = m_getfilename;
CString sSql;
TRY
{
sSql.Format("DRIVER={%s};DSN='';FIRSTROWHASNAMES=1;READONLY=FALSE;CREATE_DB=\"%s\";DBQ=%s",
sDriver, sExcelFile, sExcelFile);
if( database.OpenEx(sSql,CDatabase::noOdbcDialog) )
{
sSql = "CREATE TABLE demo (Name TEXT,Age NUMBER)";
database.ExecuteSQL(sSql);
sSql = "INSERT INTO demo (Name,Age) VALUES ('Bruno Brutalinsky',45)";
database.ExecuteSQL(sSql);
sSql = "INSERT INTO demo (Name,Age) VALUES ('Fritz Pappenheimer',30)";
database.ExecuteSQL(sSql);
sSql = "INSERT INTO demo (Name,Age) VALUES ('Hella Wahnsinn',28)";
database.ExecuteSQL(sSql);
sSql = "INSERT INTO demo (Name,Age) VALUES ('Bruno Brutalinsky',45)";
database.ExecuteSQL(sSql);
sSql = "INSERT INTO demo (Name,Age) VALUES ('Fritz Pappenheimer',30)";
database.ExecuteSQL(sSql);
sSql = "INSERT INTO demo (Name,Age) VALUES ('Hella Wahnsinn',28)";
database.ExecuteSQL(sSql);
sSql = "INSERT INTO demo (Name,Age) VALUES ('Bruno Brutalinsky',45)";
database.ExecuteSQL(sSql);
sSql = "INSERT INTO demo (Name,Age) VALUES ('Fritz Pappenheimer',30)";
database.ExecuteSQL(sSql);
}
database.Close();
}
CATCH_ALL(e)
{
TRACE1("Driver not installed: %s",sDriver);
}
END_CATCH_ALL;
plz help me
|
|
|
|
|
So where's the problem?
"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
|
|
|
|
|
problen is .xlsx file formate not work.
|
|
|
|
|
|
Take a look at point# 2 and 4 in this post[^]
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
|
I or anybody else will be able to help you, only if your query is in accordance with the guidelines. And that's all I asked you to do.
Rakesh5 wrote: ou can go to the next post for answering....
I kept my reply to you civil, so you keep yours. You're rude enough to tell me what should I be doing? I'll need to politely tell you that what I should be doing next, is none of your business.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rakesh5 wrote: Mr. Rajesh,
Thanks for your reply and info.. btw if you are not ready to help me out or ready to spend time to answer me,you need not reply or you can go to the next post for answering....
Mr. Rakesh,
Thanks for your reply and info.. btw if you are not ready to spend time to properly format your question so that it is understandable for others, you need not ask or you can go to the next forum for asking....
Seriously, if your question is not clear, you cannot expect people to help you. So, Rajesh was asking you to take some time formating your question properly and his request was perfectly valid.
|
|
|
|
|
Cedric Moonen wrote: if you are not ready to spend time to properly format your question so that it is understandable for others, you need not ask or you can go to the next forum for asking....
Excellent.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
See how lazy I am . And I only had to change one letter of the name, that's what we call efficiency
|
|
|
|
|
It's not laziness. We programmers have a jargon for that: Reusability. You see, that sounds better.
OTOH, I wonder how can people have this kind of an attitude... They are the ones seeking help here, but are not even willing to provide complete information, and you ask them to be in par with the guidelines, they tell you straight to shut up?! Ridiculous attitude.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Mr. Rakesh,
please spend the needed time on reading forum guidelines, then ask politely.
Take care, you're about to be flamed.
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]
|
|
|
|
|
Deleting your own post doesn't make you look any good either.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hello everybody,
if the user enters a character into the textbox, the mouse cursor disappears.
On a Mouse Move, the cursor re-appears. (also if a new window opens)
How is it possible to force to show the mouse cursor with "source code"?
Big thanks
|
|
|
|
|
Look up ShowCursor
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Thanks for the suggestion.
I resolved it this way ... but it's strange for me that he cursor disappears when the user makes a keystroke ...
|
|
|
|
|
It is a user setting. In the control panel, under mouse properties, pointer options tab, there is an option to hide the mouse pointer while typing.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Hi All,
i am posting one url to server and expecting some meaningful data in response but i am getting one dummy xml:
<<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GenerateSearchResponse xmlns="http://intuitivesystems"><GenerateSearchResult><SearchMode>Hotel</SearchMode><PropertyCount>135</PropertyCount><FlightCount>0</FlightCount><TotalFlightCount>0</TotalFlightCount></GenerateSearchResult></GenerateSearchResponse></soap:Body></soap:Envelope>>
Can anyone tell me that if status of the request is 200 then the response which i get will surely be correct.
and the code which i am using is:
strurl = "http://www.lowcostholidays.com/webservices/search.asmx"
xmlHttp.Open "POST", strurl, False
xmlHttp.setRequestHeader("Accept", "*/*")
xmlHttp.setRequestHeader"Referer", "http://www.lowcostholidays.com") xmlHttp.setRequestHeader("Content-Type", "text/xml")
xmlHttp.setRequestHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)")
xmlHttp.setRequestHeader("Host", "www.lowcostholidays.com")
xmlHttp.setRequestHeader("Connection", "Keep-Alive")
xmlHttp.setRequestHeader("Cache-Control", "no-cache")
xmlHttp.setRequestHeader("Cookie", strCookie(it))
xmlHttp.send (strpostdata)
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
What you want to know...?
If you want to confirm that is 200 means correct response,then yes ,as far as i m concerned (since i m using the same in my script) 200 means the same.
It's not enough to be the best, when you have capability to be great....
|
|
|
|
|
Actually i am expecting view source of a page in response of the request but i am getting some xml which i shown in my question.....
i am aware of the fact that 200 means success but i am not sure that if status is 200 then the server will give you proper response...
means is there any othe thing which i missed in setting header or something else in my code which can cause improper response.....
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
Have you expected html data in response...??
Try setting content type as "text/html" instead of "text/xml" ,hope this will we helpful.
It's not enough to be the best, when you have capability to be great....
|
|
|
|
|
Why do you think that's 'dummy' XML? It looks like a perfectly adequate web service response to me. What are you expecting it to return?
Ash_VCPP wrote: Can anyone tell me that if status of the request is 200 then the response which i get will surely be correct.
A status of 200 means that the server believes it serviced your request suitably and returned the information you wanted. So from that view, yes it means correctness. Of course, whether you were asking for the right thing is another matter.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks for the reply.....So now it seems that i must be asking for something wrong from the server, I think i need to look after urls which i am posting to server.
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
I have a stored procedure which inserts data to table and returns id of inserted data.
When I tried to execute procedure using CRecordset open method , i got exception because recordsets can only do selection (readonly).
But I saw that Addnew and Update methodes can be used to ınsert new data using recordset.
Is there any workaround for open method to execute inserts?
|
|
|
|