Click here to Skip to main content
15,910,009 members
Home / Discussions / Database
   

Database

 
GeneralRe: getting next row data into focus Pin
Glen Harvy6-Jul-06 10:51
Glen Harvy6-Jul-06 10:51 
QuestionAdd Tables Pin
Brendan Vogt4-Jul-06 5:01
Brendan Vogt4-Jul-06 5:01 
AnswerRe: Add Tables Pin
-Dr_X-5-Jul-06 7:27
-Dr_X-5-Jul-06 7:27 
QuestionSQL Server 2005 Pin
Brendan Vogt4-Jul-06 4:16
Brendan Vogt4-Jul-06 4:16 
AnswerRe: SQL Server 2005 Pin
Colin Angus Mackay4-Jul-06 6:39
Colin Angus Mackay4-Jul-06 6:39 
AnswerRe: SQL Server 2005 Pin
Eric Dahlvang5-Jul-06 3:45
Eric Dahlvang5-Jul-06 3:45 
AnswerRe: SQL Server 2005 Pin
Mike Dimmick5-Jul-06 4:33
Mike Dimmick5-Jul-06 4:33 
QuestionUnable to read binary field type Pin
BadKarma4-Jul-06 3:52
BadKarma4-Jul-06 3:52 
Hi,

I've been googling all day, found info but it still doesn't work

I have a binary field of 50 bytes long. I need to load this from the database and
store it into a byte array in my application VC++ (NO .NET). But it seems I just can't convert the SafeArray data into a BYTE[]. I'm really stuck on this. I am getting despreratly, this shouldn't be this hard so what don't i see.
...
_RecordsetPtr rsFoo;
_variant_t vtHolder;
int iMyID;
BYTE* pMyData = new BYTE[50];
try
{
  rsFoo.CreateInstance(__uuidof(Recordset));
  rsFoo->Open((_bstr_t)strQuery, GetConnectionPtr().GetInterfacePtr(), adOpenDynamic,adLockReadOnly, adCmdText);
  
  if(rsFoo->adoEOF && rsFoo->BOF)
    return;

  vtHolder = rsFoo->GetCollect("ID");
  if(vtHolder.vt != NULL)
  {
    iMyId = (int)vtHolder;
  }

  vtHolder = rsFoo->GetCollect("Data");
  if(vtHolder.vt != NULL)
  {
    //
    // i come here, and getting in the watch window
    // safearray of UI1  = [50](0,0,0,0,0,0,0,0,0,0,0,...)	tagSAFEARRAY 

....
    // WHAT TO DO HERE TO PUT THIS INT pMyData 
....
  }
}
catch...






codito ergo sum
Questionhelp on auto-increment datatype for SQL Pin
Kenzy864-Jul-06 0:44
Kenzy864-Jul-06 0:44 
AnswerRe: help on auto-increment datatype for SQL Pin
jamesr33784-Jul-06 1:51
jamesr33784-Jul-06 1:51 
QuestionError In Attcah DataBase Pin
md_refay4-Jul-06 0:37
md_refay4-Jul-06 0:37 
Question*.dtsx file and Query execution problem Pin
For_IT3-Jul-06 23:01
For_IT3-Jul-06 23:01 
QuestionImprove the efficiency of Stored Procedures Pin
Uma Kameswari3-Jul-06 19:27
Uma Kameswari3-Jul-06 19:27 
AnswerRe: Improve the efficiency of Stored Procedures Pin
Colin Angus Mackay3-Jul-06 21:53
Colin Angus Mackay3-Jul-06 21:53 
AnswerRe: Improve the efficiency of Stored Procedures Pin
Frank Kerrigan4-Jul-06 0:14
Frank Kerrigan4-Jul-06 0:14 
AnswerRe: Improve the efficiency of Stored Procedures Pin
VK-Cadec11-Jul-06 8:56
VK-Cadec11-Jul-06 8:56 
QuestionDelete or update Pin
leckey3-Jul-06 3:38
leckey3-Jul-06 3:38 
AnswerRe: Delete or update Pin
Paul Conrad3-Jul-06 7:25
professionalPaul Conrad3-Jul-06 7:25 
AnswerRe: Delete or update Pin
Frank Kerrigan3-Jul-06 22:14
Frank Kerrigan3-Jul-06 22:14 
QuestionHuge DataBases [modified] Pin
hamidreza_buddy2-Jul-06 23:44
hamidreza_buddy2-Jul-06 23:44 
AnswerRe: Huge DataBases Pin
Colin Angus Mackay3-Jul-06 1:52
Colin Angus Mackay3-Jul-06 1:52 
AnswerRe: Huge DataBases Pin
Frank Kerrigan4-Jul-06 1:26
Frank Kerrigan4-Jul-06 1:26 
QuestionSQL SERVER 2005 - "error 193 installation net framework 2.0" Pin
hasantayyar2-Jul-06 1:10
hasantayyar2-Jul-06 1:10 
QuestionRead RTF and Word file from BLOB Pin
excession1-Jul-06 6:04
excession1-Jul-06 6:04 
AnswerRe: Read RTF and Word file from BLOB Pin
Paul Conrad4-Jul-06 14:10
professionalPaul Conrad4-Jul-06 14:10 

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.