473,471 Members | 1,898 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to read binary in MSSQL 2005

3 New Member
i've been reading this binary files in this database still no luck.
it's not an ordinary binary file. coz there's no file you can see, it's all in the database. i'll attach here the database RanGame1. see the UserInven table -->UserInven having a binary data like this <binary data>
i would like to read this.

this displays when i'm reading it  @ @ @ @ 
does anyone know exactly how to read this one?

Download
RanGame1 database

i also attached screen shot of the database. help me guys
thx in advance
Attached Images
File Type: jpg binary.JPG (21.5 KB, 306 views)
Nov 24 '07 #1
4 2696
ak1dnar
1,584 Recognized Expert Top Contributor
Hi,
The Problem may not be with the database, may be its your scripts. Could you please show us the sample code snippets that you have used so far. Thanks.
Nov 25 '07 #2
programmer27
3 New Member
yah it's my script not working.
can u show me how to read it?

heres my script. open3.php just opens the database
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. //require "..\function.php";
  3. require "open3.php";
  4. $sql="SET TEXTSIZE 2147483647";
  5.  $queryall="SELECT * FROM UserInven ";
  6.  
  7.  if(!$result2 = mssql_query($queryall))
  8.    print'cannot connect result';
  9.  
  10.   print'
  11.      <table border=1>  <tr>
  12.                 <td>
  13.                    ProductNum
  14.                 </td>
  15.                 <td>
  16.                    ItemName
  17.                 </td>
  18.                </tr>
  19.    ';
  20.  
  21.   if(!$rowresult2=mssql_num_rows($result2))
  22.        print'ala';
  23.  
  24.    while ($rows2=mssql_fetch_array($result2))
  25.         {
  26.               print"
  27.               <tr>
  28.                 <td>
  29.                    {$rows2 ['ProductNum']}
  30.                 </td>
  31.                 <td>";
  32.                    //  $data=$rows2 ['UserInven'];
  33.                     header("Content-Disposition: attachment; filename=");
  34.                    // $data = substr($data,78);
  35.  
  36.                    // echo $data;
  37.  
  38.                     print"{$rows2 ['UserInven']}";
  39.                     //
  40.                     print"
  41.                 </td>
  42.                </tr>
  43.  
  44.               ";
  45.  
  46.      }
  47.        print'</table>';
  48. ?>
this displays when running it  @ @ @ @ 
Nov 28 '07 #3
ak1dnar
1,584 Recognized Expert Top Contributor
You have to use "Content-Type" header to match with the data type "UserInven" column data type.
Nov 28 '07 #4
programmer27
3 New Member
can u give me a short code to read that binary i attached?

thx for giving me the hint
Nov 28 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: mj | last post by:
Hello, thanks for the help. I am running a WinXP Pro w/ SP2 (my home computer, with ZoneAlarm firewall) Apache 2.0.52 MySQL 4.1.7 PHP 5.1.0-dev I have developed a PHP/MySQL web app that...
4
by: Simon | last post by:
Hi all, I have a process, where I take a dataset from an SQL call, and need to write an XML file from that dataset. The data set can contain 10's of tables, each with 100's of rows, and I have...
1
by: Optimus | last post by:
Hi everyone, I've got issue about MARS feature support in ASP.NET 2.0 and MSSQL 2.0 How to get things work? What i've done is I got vs.net 2.0 and MSSQL 2005 installed on my pc. Then I tried...
1
by: theintrepidfox | last post by:
Dear Group. Wondered if any of you has any suggestion for the following? Trying to install SQL Server 2005 Eval on a 'clean' machine. Well, my mistake was probably that I had installed Visual...
0
by: Derftics | last post by:
Hi Guys, Is there anyone who have tried installing MSSQL 2000 and MSSQL 2005 servers in one desktop computer? I have tried using MSDE and successfully install the MSSQL 2000 server but when I...
7
by: Igor | last post by:
1. In this topic...
7
by: Olegus | last post by:
Hello, in order to perform backup/restore MSSQL database using SMO, one needs to reference several namespaces in a backup class : using Microsoft.SqlServer.Management.Common; using...
0
by: Derftics | last post by:
Hi Guys, Anyone knows how to script all the users with permission and access level to an object in MSSQL 2005? In MSSQL 2000 you can use the scripting in EM just go to the option "script...
11
by: Icemokka | last post by:
Hi, I'm need to upload a big file ( 600Mb+ ) to a BLOB field in MSSQL 2005. My code looks like this : fs = New FileStream(sFilePath, FileMode.Open) Dim ByteArray(fs.Length) As Byte...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.