Click here to Skip to main content
15,911,139 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: problem with a control ActiveX Pin
zizzzz25-Oct-06 23:42
zizzzz25-Oct-06 23:42 
GeneralRe: problem with a control ActiveX Pin
Cedric Moonen25-Oct-06 23:50
Cedric Moonen25-Oct-06 23:50 
GeneralRe: problem with a control ActiveX Pin
zizzzz26-Oct-06 5:20
zizzzz26-Oct-06 5:20 
Questionpath name Pin
radhika2825-Oct-06 21:19
radhika2825-Oct-06 21:19 
AnswerRe: path name Pin
stanlymt25-Oct-06 23:28
stanlymt25-Oct-06 23:28 
AnswerRe: path name Pin
freeman86825-Oct-06 23:33
freeman86825-Oct-06 23:33 
AnswerRe: path name Pin
ThatsAlok26-Oct-06 19:25
ThatsAlok26-Oct-06 19:25 
Questionhow to restrict access for USB device Pin
pavan_sw25-Oct-06 21:07
pavan_sw25-Oct-06 21:07 
QuestionKill DirectX Pin
Daniel Kanev25-Oct-06 20:39
Daniel Kanev25-Oct-06 20:39 
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 

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.