| Author |
Topic  |
|
|
mattster2020
Starting Member
6 Posts |
Posted - 01/11/2012 : 11:49:53
|
Afternoon All,
I'm using the function below in SQL2008 to convert a binary to hex
master.sys.fn_varbintohexstr(@Supp_Attach_id)
Our production enviroment uses SQL2000, does anyone know of a function or code that can do the same?
Regards,
Matt |
|
|
sunitabeck
Flowing Fount of Yak Knowledge
5152 Posts |
|
|
mattster2020
Starting Member
6 Posts |
Posted - 01/11/2012 : 13:16:17
|
Thanks Sunitabeck,
I have compiled the following code:
Declare @Supp_Attach_id binary(8), @Supp_Attach_Name varchar(300), @hexstr varchar(300), @cmd varchar(1000) set @Supp_Attach_id = 0x00000000000000B8 set @Supp_Attach_Name = 'email3.txt' set @hexstr = '' exec master.dbo.xp_varbintohexstr @Supp_Attach_id, @hexstr output print @hexstr
--SET @CMD = '\\Poland\Filepath\Email_Attach_Temp\App\Save_Attachments' + ' ' + master.sys.fn_varbintohexstr(@Supp_Attach_id) + ' ' + @Supp_Attach_Name SET @CMD = '\\Poland\Filepath\Email_Attach_Temp\App\Save_Attachments.exe' + ' ' + (@hexstr) + ' ' + @Supp_Attach_Name Print @cmd EXEC master..xp_CMDShell @CMD
Doesnt seem to be converting the binary to hex correctly though? |
 |
|
|
sunitabeck
Flowing Fount of Yak Knowledge
5152 Posts |
Posted - 01/11/2012 : 14:39:02
|
Unfortunately, I don't have SQL 2000 to test this or see its behavior (I know so little about SQL 2000 in any case).
Hopefully someone else who has more familiarity with SQL 2000 will respond. |
 |
|
|
Transact Charlie
Flowing Fount of Yak Knowledge
United Kingdom
3426 Posts |
Posted - 01/11/2012 : 17:23:18
|
I wrote a post about this ages ago, I'll try and find it
Charlie =============================================================== Msg 3903, Level 16, State 1, Line 1736 The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
 |
|
|
Transact Charlie
Flowing Fount of Yak Knowledge
United Kingdom
3426 Posts |
Posted - 01/11/2012 : 19:02:38
|
This is what I was thinking of : http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=138869
Not sure if it's helpful though....
Charlie =============================================================== Msg 3903, Level 16, State 1, Line 1736 The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
 |
|
| |
Topic  |
|