Click here to Skip to main content
15,914,924 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Can I derive from an ATL ActiveX control? Pin
markjmalin26-Oct-06 3:15
markjmalin26-Oct-06 3:15 
GeneralRe: Can I derive from an ATL ActiveX control? Pin
led mike26-Oct-06 4:50
led mike26-Oct-06 4:50 
GeneralRe: Can I derive from an ATL ActiveX control? Pin
markjmalin26-Oct-06 4:54
markjmalin26-Oct-06 4:54 
GeneralRe: Can I derive from an ATL ActiveX control? Pin
led mike26-Oct-06 5:31
led mike26-Oct-06 5:31 
GeneralRe: Can I derive from an ATL ActiveX control? Pin
markjmalin26-Oct-06 5:53
markjmalin26-Oct-06 5:53 
GeneralRe: Can I derive from an ATL ActiveX control? Pin
led mike26-Oct-06 6:06
led mike26-Oct-06 6:06 
GeneralRe: Can I derive from an ATL ActiveX control? Pin
markjmalin26-Oct-06 6:24
markjmalin26-Oct-06 6:24 
QuestionOLE DB app crashes when using non-Access data source Pin
User 1278218-Oct-06 16:45
User 1278218-Oct-06 16:45 
I'm working on a data processing application where the user selects the data source and relevant fields at runtime. No matter what the source (Access, Excel, MySQL, etc) I am able to retrieve the table names and column information. But for any non-access data source, when I query it, there are no rows returned and the application crashes on my MoveFirst call. Here is the source, and forgive me, this is my first time with ATL:

<br />
    CDataSource source;<br />
    CSession sess;<br />
<br />
    CTable<CDynamicAccessor> rs;<br />
<br />
	USES_CONVERSION;<br />
<br />
	if(source.OpenFromInitializationString(A2OLE(m_lpFilename))!=S_OK)<br />
		return FALSE;<br />
	<br />
<br />
	if(sess.Open(source)!=S_OK)<br />
	{<br />
		sess.Close();<br />
		source.Close();<br />
<br />
		return FALSE;<br />
	}<br />
<br />
<br />
	CString sSQL="..."<br />
<br />
	//The result is sSQL="SELECT tbl.[field1],tbl.[field2],tbl.[field3],tbl.[field4] FROM tbl ORDER BY tbl.[field1]"<br />
	//differs based on the values for field1, etc<br />
<br />
	rs.Open(sess,sSQL);<br />
<br />
	HRESULT hr=rs.MoveFirst();<br />


The debugger asserts on the rowset being NULL, so I take it nothing was returned from the data source but queries run against the database (like in the MySQL console) return rows.

Any idea at all whats going wrong?

Thanks,
Aaron

modified 12-Jul-20 21:01pm.

AnswerRe: OLE DB app crashes when using non-Access data source Pin
Jörgen Sigvardsson19-Oct-06 9:51
Jörgen Sigvardsson19-Oct-06 9:51 
GeneralRe: OLE DB app crashes when using non-Access data source Pin
User 1278219-Oct-06 17:53
User 1278219-Oct-06 17:53 
QuestionAtl New Object Pin
With_problem17-Oct-06 16:35
With_problem17-Oct-06 16:35 
QuestionRe: Atl New Object Pin
prasad_som17-Oct-06 19:59
prasad_som17-Oct-06 19:59 
QuestionDCOM in WinXP or samething esle is better [modified] Pin
Greg_moon16-Oct-06 0:12
Greg_moon16-Oct-06 0:12 
Questionwhy triats declaration cannot work? Pin
Yaki_1515-Oct-06 21:21
Yaki_1515-Oct-06 21:21 
GeneralRe: why triats declaration cannot work? Pin
prasad_som17-Oct-06 18:50
prasad_som17-Oct-06 18:50 
AnswerRe: why triats declaration cannot work? Pin
Lim Bio Liong18-Oct-06 3:48
Lim Bio Liong18-Oct-06 3:48 
GeneralRe: why triats declaration cannot work? Pin
Yaki_1518-Oct-06 15:00
Yaki_1518-Oct-06 15:00 
GeneralRe: why triats declaration cannot work? Pin
Lim Bio Liong18-Oct-06 16:04
Lim Bio Liong18-Oct-06 16:04 
GeneralRe: why triats declaration cannot work? Pin
Yaki_1518-Oct-06 15:29
Yaki_1518-Oct-06 15:29 
GeneralRe: why triats declaration cannot work? Pin
Lim Bio Liong18-Oct-06 16:01
Lim Bio Liong18-Oct-06 16:01 
QuestionI want to upload mp3 files using .net Pin
vijayprakash.g14-Oct-06 4:39
vijayprakash.g14-Oct-06 4:39 
AnswerRe: I want to upload mp3 files using .net Pin
Sceptic Mole20-Oct-06 0:41
Sceptic Mole20-Oct-06 0:41 
Questionhow to print the data listview to a bill Pin
ztkx12-Oct-06 19:28
ztkx12-Oct-06 19:28 
QuestionChanging the Classid for every rebuild. Pin
Eytukan12-Oct-06 3:09
Eytukan12-Oct-06 3:09 
AnswerRe: Changing the Classid for every rebuild. Pin
Mike Dimmick12-Oct-06 23:50
Mike Dimmick12-Oct-06 23:50 

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.