|
-
April 9th, 1999, 07:28 AM
#1
[ADO] How to retrieve TEXT fields from SQL
In ADO, TEXT fileds are converted into adLongVarChar.
In Visual C++, How to use this?
I tried to use GetValue() and cast into _bstr_t, but error occurred.
Invoking GetChunk(1000) and casting into _bstr_t is also failed.
I'm embarrassed.
What I have to do?
I'll appreciate your answer.
A programmer who loves Goethe.
-
April 9th, 1999, 08:46 AM
#2
Re: [ADO] How to retrieve TEXT fields from SQL
If you need to filtr data on text based criteria then do this:
m_strFilter = "[your_table_name].[text_variable] Like "+ CString("'")+m_sName +
CString("'");
then open the recordset. You will get the data filtered.
Remember the backets will remain in your code.
good luck
Shahzad
-
April 9th, 1999, 08:26 PM
#3
Re: [ADO] How to retrieve TEXT fields from SQL
I'm sorry I don't understand the answer.
I meant that I tried to retrieve a field which its Type property is "adLongVarChar" then, to convert into BSTR. The error was occurred at this casting time.
"Visual C++ Run Time Error"
I don't understand why to use filter.
Regards
A programmer who loves Goethe.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|