I know anything about Interbase. My client run it at their office and I need to export some info to convert and then put into MySQL server. It's all ok for textual information (export to csv) but i've got some problem to grab the stored image from the Database.
My client used Run-It as the front-end of the DB and the support told me to create jpeg from binary data using ODBC.
I really need some help about that. Can someone have any idea ???
Sounds like you want the ADODB.Stream object. I use the following code to receive a binary file upload from the client and write it to a file on the server:
Code:
Dim adoStream, stream
Set adoStream = Server.CreateObject("ADODB.Stream")
adoStream.Open()
adoStream.Type = adTypeBinary
stream = mpRequestFiles(fld, 1)
adoStream.Write stream
adoStream.SaveToFile Server.MapPath("/uploads/" & fileName), adSaveCreateOverWrite
adoStream.Close()
Set adoStream = Nothing
Set adoStream = Server.CreateObject("ADODB.Stream")
adoStream.Type = adTypeBinary
While Not rs.EOF
adoStream.Open()
adoStream.Write fldName ' your binary database field here
adoStream.SaveToFile Server.MapPath(PathAndFileName), adSaveCreateOverWrite
adoStream.Close()
'
rs.MoveNext
Loop
Set adoStream = Nothing
Your connection string specifies a DSN ("vasco") that evidently has the database path and file name coded as "/vasco/test.asp" -- which would not be correct in my book. I'd say that you need to fix your DSN.
Originally posted by turb I use Easysoft driver. I've create an ODBC dns connection and when I click on the button TEST, it said "connect test successfully"
Yes, but where is that DNS defined? Is it defined on the same computer where your ASP code executes?
Well, that is not quite the whole question. Where does the server software execute? By the way... Which server software (IIS, Apache, etc.) are you using?
Yes, I'm not familiar with Interbase either. Sorry. A question though... Did the Interbase documentation tell you to use the following specification in your connection string?
Provider=MSDASQL;
I ask, because I believe this is a MicroSoft interface to SQL Server databases. Otherwise, try changing your connection string to this:
Bookmarks