Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting PDF data from Informix

Status
Not open for further replies.

EdGioja

Programmer
Nov 6, 2003
39
US
I am finding that more and more of my project dilemnas straddle two or more subjects. I am posting this in both the vb.net and the PDF forums.

I have byte field in an informix table that contains a PDF document. Of course I can query this field with no problem using ODBC, but I don't know how to make it a PDF after I get the data. I have the PDF SDK.

If anyone can point me in the right direction, I would greatly appreciate it.
 
Thank you.
I'll try that, though I've never worked with BLOB before.

 
I've been trying to figure out how to do this, but I'm stuck.

I have an odbc connection to the informix database. The field I'm trying to pull is a BYTE type.

I have this so far:

Dim docCommand As New Odbc.OdbcCommand("Select dm_doc from document where dm_id = 12007486 and dm_seq = 0", connCM)
docCommand.Connection = connCM
docRdr = docCommand.ExecuteReader(CommandBehavior.SequentialAccess)
Do While docRdr.Read()

' here is the area I am confused
' I'm pretty sure I use d
docRdr.GetBytes(0,0,Mybuffer,0,length)

' I've never used Getbytes before, though, and can't find a good example.
' PLEASE correct me if I'm wrong...
' The first number should be 0 because I only have 1 column of data.
' The second number should be 0 because I want to start reading at the beginning of the file.
' How do I set up MyBuffer to accept input?
' The third number should be 0 because I want to write from the beginning
' I don't know what the last number should be. How do I know the length of the byte field I'm reading?

Thank you.




Loop
 
Never mind, I figured this out.

Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top