i950
asked on
How can I convert a Binary field to Long binary data?
Hello,
The title says it all...
Please help. Thanks.
The title says it all...
Please help. Thanks.
is this field in an access table?
ASKER
Yes.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'm a beginner... where should I run that code?
Thanks.
Thanks.
you can place the codes in a click of a command button in a form
private sub command0_click()
currentdb.execute "alter table NameOfTable alter column binaryfieldname longbinary"
end sub
do you know how to create button in a form?
what is the name of the table? the name of the field?
private sub command0_click()
currentdb.execute "alter table NameOfTable alter column binaryfieldname longbinary"
end sub
do you know how to create button in a form?
what is the name of the table? the name of the field?
ASKER
I think I was able to run the code but nothing changed. It still showing "Binary" not "long binary data"
Thanks.
Thanks.
can you post the codes that you use, all of it
ASKER
Here it is:
Option Compare Database
Private Sub Option4_Click()
currentdb.execute "alter table ev1 alter column binp longbinary"
End Sub
It's on the Click event or a radio button.
Option Compare Database
Private Sub Option4_Click()
currentdb.execute "alter table ev1 alter column binp longbinary"
End Sub
It's on the Click event or a radio button.
you should see Ole Object in the data type column when you open the table in design view.
check again.
check again.
ASKER
I do.. but when I double click the table it's showing "Binary" only.
The reason I want to change it to long binary data is the long binary data is byte by byte the same as the file that was entered in the database. When a file is saved as Binary only, chars are being added at the beginning of the file and when I'm extracting the files it's being corrupted.
The reason I want to change it to long binary data is the long binary data is byte by byte the same as the file that was entered in the database. When a file is saved as Binary only, chars are being added at the beginning of the file and when I'm extracting the files it's being corrupted.
The LONGBINARY data field is used to store graphic image data and allows any alphanumeric data to be entered and saved.
don't double click the table.
select the table and click Design from the database objects menu.
now look for the field {binp } and see what is written in the Data Type column
don't double click the table.
select the table and click Design from the database objects menu.
now look for the field {binp } and see what is written in the Data Type column
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try
Option Compare Database
Private Sub Option4_Click()
currentdb.execute "alter table ev1 alter column binp longbinary"
msgbox "Code was run" '<--- you should get this message
End Sub
Option Compare Database
Private Sub Option4_Click()
currentdb.execute "alter table ev1 alter column binp longbinary"
msgbox "Code was run" '<--- you should get this message
End Sub
ASKER
> don't double click the table.
> select the table and click Design from the database objects menu.
> now look for the field {binp } and see what is written in the Data Type column
It's written OLE Object
> msgbox "Code was run" '<--- you should get this message
I got that message
Please help. Thank you.
> select the table and click Design from the database objects menu.
> now look for the field {binp } and see what is written in the Data Type column
It's written OLE Object
> msgbox "Code was run" '<--- you should get this message
I got that message
Please help. Thank you.
It's written OLE Object <--- this is Long Binary
ASKER
When I double click it, it says "Binary", I have tables when I double click on them I see "long binary data" and those work with my application while "Binary only doesn't work.
Any idea how convert them "completely" to "long binary data"?
Any idea how convert them "completely" to "long binary data"?
well, i guess you my have lost some information when the data was entered to the binary field.
try the conversion of the field to Long Binary in an empty table and fill the field with long binary data.
try the conversion of the field to Long Binary in an empty table and fill the field with long binary data.
ASKER
I didn't lose anything, but Binary field adds some additional info at the beginning of the file, and when I read it using a programming language and then write it to disk I get unnecessary information at the beginning of the file that is corrupting it :(
Did we get a resolution to this question?
mx
mx
??
ASKER
?