karthik_kota
asked on
how do i convert binary values obtained from sql server 2005 to varchar and display in ms access 2007 queries
i am trying to create a query in ms access where in i am obtaining a binary value from sql server 2005. i am not able to display the same in ms access 2007. it is showing some junk values. i actually want to convert this to varchar so that i can link that field to another varchar field in the tables to display the values. please help me out. i am trying to create a custom function in ms access which convert binary to varchar so that i can use that varchar in queries
In conjunction with the method you could use a linked server to the access database to get the data from the MS SQL server to the table in MS Access
ASKER
yes i do know about the function fn_varbintohexstr. also there is dbo.hex function. but i dont want to make any changes in sql 2005. i am actually looking for a custom function(vb script) in ms access which converts binary to varchar and displays the binary value properly(instead of using junk values) when used in ms access queries and should be able to link that field to another varchar field to obtain values
ASKER
the binary data is like this "0x174795BED6B1B141B55628E 500FC50FC" . this is of binary datatype. i want to convert this to varchar format by creating a custom function in ms access. please help me out. i dont want to make any changes in sql
ASKER
is there any function in ms access which does that.
ASKER
ok i will make it simple. i have dbo.contact. persid(varchar) and dbo.chg. uuid(binary). both are from different tables. i have imported these tables from sql server 2005. now i want to link these two fields in ms access 2007 query ( when contact.persid = chg.uuid) and get the results displayed. but since both are of different datatypes. i am not able to get the results from querry. please help me out in having a custom function to convert binary to varchar. ultimately i want to see the results from the querry overcoming the problem in datatype
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
perfect sollution
Look at this for more information: https://www.experts-exchange.com/questions/20289438/Converting-a-Binary-to-a-Varchar.html