Click here to Skip to main content
15,898,373 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Kill DirectX Pin
Hamid_RT25-Oct-06 21:05
Hamid_RT25-Oct-06 21:05 
GeneralRe: Kill DirectX Pin
Daniel Kanev25-Oct-06 21:27
Daniel Kanev25-Oct-06 21:27 
QuestionWindows related Question (VC++) Pin
Programm3r25-Oct-06 19:22
Programm3r25-Oct-06 19:22 
AnswerRe: Windows related Question (VC++) Pin
Jonathan [Darka]25-Oct-06 21:13
professionalJonathan [Darka]25-Oct-06 21:13 
Questionhow to achieve .... Pin
Anamika200525-Oct-06 19:13
Anamika200525-Oct-06 19:13 
AnswerRe: how to achieve .... Pin
Hamid_RT25-Oct-06 19:28
Hamid_RT25-Oct-06 19:28 
AnswerRe: how to achieve .... Pin
Rajesh R Subramanian25-Oct-06 19:41
professionalRajesh R Subramanian25-Oct-06 19:41 
Questionerror in code? Pin
With_problem25-Oct-06 19:07
With_problem25-Oct-06 19:07 
I am using this code to insert data in databse,BY DOING oledb CONNECTION WITH DATABSE.....
can anybody help to get what i am doing wrong here.....i have made comment line error occure
ERROR is : cannot convert from 'unsigned short [139]' to 'char []'

<br />
     HRESULT hr;<br />
	hr = CoInitialize(NULL);<br />
	CDataSource connection;<br />
	CSession session;<br />
	CCommand<CAccessor<CTQuoteAccessor> > TQuote;<br />
	CDBPropSet	propset(DBPROPSET_DBINIT);<br />
<br />
		propset.AddProperty(DBPROP_AUTH_CACHE_AUTHINFO, true);<br />
		propset.AddProperty(DBPROP_AUTH_ENCRYPT_PASSWORD, false);<br />
		propset.AddProperty(DBPROP_AUTH_MASK_PASSWORD, false);<br />
		propset.AddProperty(DBPROP_AUTH_PASSWORD, OLESTR(""));<br />
		propset.AddProperty(DBPROP_AUTH_USERID, OLESTR("Admin"));<br />
		propset.AddProperty(DBPROP_INIT_DATASOURCE, OLESTR("C:\\MyDocuments\\ODLData.mdb"));<br />
		propset.AddProperty(DBPROP_INIT_MODE, (long)16);<br />
		propset.AddProperty(DBPROP_INIT_PROMPT, (short)4);<br />
		propset.AddProperty(DBPROP_INIT_PROVIDERSTRING, OLESTR(""));<br />
		propset.AddProperty(DBPROP_INIT_LCID, (long)1033);<br />
		hr = connection.Open(_T("Microsoft.Jet.OLEDB.4.0"), &propset);<br />
		// open a session<br />
		hr = session.Open(connection);<br />
		<br />
	CCommand<CAccessor<CTQuoteAccessor> >cmd;<br />
	CCommand<CDynamicAccessor,CRowset>commandInsert;<br />
<br />
// ERROR IN THIS LINE   cannot convert from 'unsigned short [139]' to 'char []'<br />
	TCHAR tszSQL[] = L"INSERT INTO TQuote    (m_ID,m_DateTimeStamp,m_MarketNo,m_MarketName,m_Bid,m_Ask,m_MarketState) VALUES   (Sessionid,Timestamp,a,Market,Bid,Ask,d)";<br />
<br />
        hr = commandInsert.Open(session,(LPCTSTR) tszSQL,NULL,NULL,DBGUID_DBSQL,false);<br />
  	hr = session.Commit();<br />
<br />
	CDialog::OnOK();<br />
<br />

A Million Thanks for any support
AnswerRe: error in code? Pin
ThatsAlok25-Oct-06 20:40
ThatsAlok25-Oct-06 20:40 
GeneralRe: error in code? Pin
With_problem26-Oct-06 16:22
With_problem26-Oct-06 16:22 
AnswerRe: error in code? Pin
ThatsAlok26-Oct-06 19:23
ThatsAlok26-Oct-06 19:23 
QuestionImage preview or thumbnail Pin
kiranin25-Oct-06 18:09
kiranin25-Oct-06 18:09 
AnswerRe: Image preview or thumbnail Pin
Hamid_RT25-Oct-06 19:27
Hamid_RT25-Oct-06 19:27 
AnswerRe: Image preview or thumbnail Pin
ThatsAlok25-Oct-06 20:21
ThatsAlok25-Oct-06 20:21 
QuestionWhere to specify "domain" besides "username" and "password" using WinInet API? Pin
chairman nirvana25-Oct-06 16:50
chairman nirvana25-Oct-06 16:50 
AnswerRe: Where to specify "domain" besides "username" and "password" using WinInet API? Pin
ThatsAlok25-Oct-06 18:30
ThatsAlok25-Oct-06 18:30 
GeneralRe: Where to specify "domain" besides "username" and "password" using WinInet API? Pin
chairman nirvana25-Oct-06 19:45
chairman nirvana25-Oct-06 19:45 
GeneralRe: Where to specify "domain" besides "username" and "password" using WinInet API? Pin
Mila02525-Oct-06 19:50
Mila02525-Oct-06 19:50 
GeneralRe: Where to specify "domain" besides "username" and "password" using WinInet API? Pin
chairman nirvana25-Oct-06 20:24
chairman nirvana25-Oct-06 20:24 
QuestionCFileFind Pin
locoone25-Oct-06 14:39
locoone25-Oct-06 14:39 
AnswerRe: CFileFind Pin
Stephen Hewitt25-Oct-06 18:37
Stephen Hewitt25-Oct-06 18:37 
AnswerRe: CFileFind Pin
Hamid_RT25-Oct-06 19:38
Hamid_RT25-Oct-06 19:38 
AnswerRe: CFileFind Pin
Mila02525-Oct-06 19:43
Mila02525-Oct-06 19:43 
QuestionRe: CFileFind Pin
David Crow26-Oct-06 3:56
David Crow26-Oct-06 3:56 
AnswerRe: CFileFind Pin
locoone27-Oct-06 10:49
locoone27-Oct-06 10:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.