Showing posts with label displaying. Show all posts
Showing posts with label displaying. Show all posts

Wednesday, March 28, 2012

Problem in displaying or inserting data into sqlserver tables using utf

i have such a error in my sql server db
i examined arabic_ci_as and SQL_Latin1_General_CP1256_CI_AS
but in my web pages that uses utf-8 codepage that retrieves data using ado and asp scripting the ouput or inserted that dispalyed in both of query analyzer and Enterprise manager replaces or display '???' for characters .
i am using nchar and nvarchar and ntextany one to help me i need it emergenciely
with thanks arqa|||Originally posted by arqa
i have such a error in my sql server db
i examined arabic_ci_as and SQL_Latin1_General_CP1256_CI_AS
but in my web pages that uses utf-8 codepage that retrieves data using ado and asp scripting the ouput or inserted that dispalyed in both of query analyzer and Enterprise manager replaces or display '???' for characters .
i am using nchar and nvarchar and ntext

i must add that i am using with farsi localization winserver 2k|||How about status of windows locale?

It is required to install Arabic language support on OS part.

Do not use an Arabic name for the SQL server.
For further details, please refer to the SQL server and Arabic support whitepaper below: http://www.microsoft.com/middleeast/arabicdev/dotnetservers/SQL
/wpapers.asp#sql_arabicsupport_installingsqlserver
The windows code page must be the same on both the server and the client.

The recommended is standard Arabic code page is 1256.|||hi satya thanks to your answer

i am already localized my windows to farsi(arabic) and i have not any problem with typing in farsi and local setting but i dont know how i can
setup(!) arabic(farsi) in remote sqlserver is because it is far from me and i have not any control and you think realy i need to do such a thing or no becuse the remote server hosts large number of databases in deffernet code page and the os not reachable(!?) .
other thing is that how i can use same code page to client and server
in this case i am using a sqlserver for hosting my data gather from a website in other host that is far away other this is that this page must viewed by any users that may not localized windows or OS i use it for a web site and for a web based goal i think i must use unicode code page for this utf-8 and i must use such a code page in both sql server and
my webpages to display informations(data) in none localized OS or
systems but know i dont know what i must to do the below code is peace of code that i used to create table in remote server
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Member_Info]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Member_Info]
GO
CREATE TABLE [dbo].[Member_Info] (
[id] [bigint] IDENTITY (1, 1) NOT NULL ,
[First] [nvarchar] (50) COLLATE Arabic_CI_AS NULL ,
[Last] [nvarchar] (50) COLLATE Arabic_CI_AS NULL ,
[Father_Name] [nchar] (50) COLLATE Arabic_CI_AS NULL ,
[Date_Birth] [decimal](18, 0) NULL ,
[Birt_num] [bigint] NULL ,
[Birt_Place] [nvarchar] (50) COLLATE Arabic_CI_AS NULL ,
[Mariage_Condition] [nvarchar] (50) COLLATE Arabic_CI_AS NULL ,
[Colg_cond] [nchar] (20) COLLATE Arabic_CI_AS NULL ,
....................
i am examined
sql_latin1_general_cp1256 for this manner but is not fullfil me and the results is not defferent and not changed(!?)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
i have some question that is i install arabic is that
and other thing that i confused arabic name i dont use arbic name for
dose it mean a database name such as members_db or other things but i am using english name for my db name and tables name and collmns name and the only thing must be none english is the data is inserted into tables.|||Thanx for Your Attention.
i am study more about this problem but suddenly i cant solve it but i am grasp some new thing about .
i am using A FORM page AND a Insert Page (USING ASP/ADO SCRIPTING) and
Unicode (utf-8) Code Page In Both Page AND ARABIC_CI_AS Collation And nvarchar() ans nchar data Type In SQLSERVER Ta i am get the below results.
1.when i am using This<% @.CODEPAGE="65001" %> directive In Both Page The Insert Data is Simlar To '??' And all characters Replaced With '?'s and it is Wrong And In My Webpages Displayed Like '??' When i remove
the code page directive in second page(Insertion Page) The Data is Inserted and Displayed correct in webpage but i cant see it in Enterprise Manager but in this manner the data isn't display like before but like a manner that code page(collation) is not correct in my client computer becuse i am examined a query that compare and its work correctly (My Computer Locals is Farsi) how i can solve this problem PLEASE CONTACT ME VIA EMAIL .
thanks

Problem in Displaying NTEXT field from database?

Hello,

I have around 7 ntext fields in my data base table and I am getting data from the data base table through executing stored procedure, But when I am displaying data using record set, few of the ntext fields in recored set are empty .Iam sure that these are having data in table.

I am not sure why recordset is lossing that ntext field data?Because of this I am unable to display that data in web form.

any ideas really appriciated.

Thanks

Ram

text and ntext fields should always be either the only data returned or the last item in a select statement.

For example:

SELECT ntextField FROM myTable WHERE something = true

or

SELECT myFirstField, myOtherField, ntextField FROM myTable WHERE something = true

This is a limitation of MSSQL server and (some versions) of MySQL. If you are using MSSQL Server 2005, I would suggest changing the database column to a nvarchar(MAX) as this will store the same number of characters as an ntext column. (I believe they intended to remove text and ntext from the next release of MSSQL Server in favor of varchar(MAX) and nvarchar(MAX), but don't quote me on that.)

|||

I am using SQLserver 2000, What will be the possible solutions for this problem.

Thanks

|||

You will have to select each ntext field individually. So you will need 7 select statements each time.

However, I would recommend changing the database to use a different type of column. If you know the data will never be larger than 8K you can still use nvarchar(8000) on SQL Server 2000. Or you could combine some of the columns and then use delimiters so that you have one huge column with something like ||| between entries (but this may cause other problems.)

In general text, ntext and blob fields should be used as rarely as possible, it is usually easier to put that much data into a file and then store the files name and location in SQL Server.

Let me know if this doesn't really answer your question.

|||

Hi,

Its working for me now..What I did is ...

I have got all ntext fields from the recordset first into some varialbles before acesing non ntext fields and mapped to the form controls.

thats it.

thanks

Monday, March 12, 2012

Problem displaying report services in client browsers

Hi all

I'm working on a project where we've developed a number of reports using SQL Reporting Services. Everything works fine on the developer PCs and when they cannect to the reporting services URL they can see all the reports listed and everything works fine. When the testers connect, they can see the basic reporting services homepage with the contents and properties tabs. But when they click on the contents tab nothing is displayed.

The tester pcs are locked down and the user profiles wouldnt have the same access rights as the developers who are all local admins on their PCs.

My question is what would prevent the reports from being listed? Is there an activex control that is possibly being blocked by the local security policy for the tester profiles? If this is the case is there anything that can be pre installed on the client pcs to get around this problem?

Any thoughts or assistance that anyone could provide would be grately approeciated

Thanks

Mark
Make sure that these users have the proper roles assigned for the report server. There is Browser, Content Manager (that can pretty much do everything), Report Builder, My Reports and Publisher. There is also a way to define custom roles if needed. The Report server manager can set up users, groups and role assignments.

Problem Displaying Japanese Characters

We are a software developer here and ran into a problem trying to get SQL Server to display Japanese Characters through a linked server properly. Does anybody have any similar experiences?

The following configurations were able to display Japanese characters properly:
===============================================================================
1. Write a C# application to get Japanese characters from an AS400 table containing Japanese texts. The Japanese text was displayed on the DataGrid. The provider used was HiT OLEDB Server/400. A 30 day eval copy can be obtained from the following link:
http://www.hitsw.com/products_services/register/register_oledb_svr_400.html

2. Create a table containing Japanese text on SQL Server A and create a linked server on SQL Server B linking to SQL Server A. Change the font type of SQL Server B's query analyzer to a font that is compatible with Japanese character. (See code sample one at the bottom of this message for the code used)

3. On a new PC, install Japanese edition of Windows 2000 plus Japanese Edition of SQL Server 2000. Create a linked server pointing to a Japanes table on the AS400 using the HiT OLEDB provider.

The following configurations were not able to display Japanese characters properly:
===================================================================================
i. On a PC with English version of Windows 2000 Professional and English version of SQL Server, change the query analyzer font to a font that is compitable with Japanese text and then use the HiT OLEDB provider to create a linked server pointing to the Japanese table on the AS400.

ii. On the same PC above, install IBM Client Access and make a new linked server pointing to the same Japanese table on the AS400 using Client Access. A Japanese compitable font was selected in the query anaylzer.

The odd thing is that in configuration (1), we were able to see the Japanese characters correctly which suggests that the HiT OLEDB provider has passed the information back to the PC correctly. And in configuration (2) and (3), we were able to show that SQL Server has no problem displaying Japanese characters regardless of its language edition.

We are not sure why it is behaving this way. Does anybody have any thought?

Here is the code used:

Code Sample One
===============
The following code was used on an English version of SQL Server 2000 running on an English version of Windows

2000 professional

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tblJap]') and OBJECTPROPERTY(id,

N'IsUserTable') = 1)
drop table [dbo].[tblJap]
GO

CREATE TABLE [dbo].[tblJap] (
[CID] [int] IDENTITY (1, 1) NOT NULL ,
[Jap] [nchar] (30) NOT NULL ,
[Eng] [char] (30) NOT NULL
) ON [PRIMARY]
GO

INSERT INTO tblJap (Jap, Eng) VALUES ('織田信長','Oda Nobunaga')
INSERT INTO tblJap (Jap, Eng) VALUES ('豊臣秀吉','Toyotomi Hideyoshi')
INSERT INTO tblJap (Jap, Eng) VALUES ('徳川家康','Tokugawa Ieyasu')
--See note below
GO

SELECT * FROM tblJap

Note
====
Another odd thing was that if I run the code
INSERT INTO tblJap (Jap, Eng) VALUES ('織田信長','Oda Nobunaga')
from query analyzer, the Japanese characters showed up as ? in Enterprise Manager. But if I edit the information again from Enterprise Manager, it shows up properly in both Enterprise Manager and Query Analyzer.

Results you are seeing might be due to the fact that you are inserting characters as regular chars and not as Unicode chars, and their translation (effectively truncation) is affected by Query Analyzer.

Instead of

INSERT INTO tblJap (Jap, Eng) VALUES ('...(Japanese chars)...','Oda Nobunaga')

try

INSERT INTO tblJap (Jap, Eng) VALUES (N'...(Japanese chars)...','Oda Nobunaga')

and see if that fixes your problem.

Regards,
Boris.|||Your solution is working fine.

Problem Displaying Japanese Characters

We are a software developer here and ran into a problem trying to get SQL Server to display Japanese Characters through a linked server properly. Does anybody have any similar experiences?

The following configurations were able to display Japanese characters properly:
===============================================================================
1. Write a C# application to get Japanese characters from an AS400 table containing Japanese texts. The Japanese text was displayed on the DataGrid. The provider used was HiT OLEDB Server/400. A 30 day eval copy can be obtained from the following link:
http://www.hitsw.com/products_services/register/register_oledb_svr_400.html

2. Create a table containing Japanese text on SQL Server A and create a linked server on SQL Server B linking to SQL Server A. Change the font type of SQL Server B's query analyzer to a font that is compatible with Japanese character. (See code sample one at the bottom of this message for the code used)

3. On a new PC, install Japanese edition of Windows 2000 plus Japanese Edition of SQL Server 2000. Create a linked server pointing to a Japanes table on the AS400 using the HiT OLEDB provider.

The following configurations were not able to display Japanese characters properly:
===================================================================================
i. On a PC with English version of Windows 2000 Professional and English version of SQL Server, change the query analyzer font to a font that is compitable with Japanese text and then use the HiT OLEDB provider to create a linked server pointing to the Japanese table on the AS400.

ii. On the same PC above, install IBM Client Access and make a new linked server pointing to the same Japanese table on the AS400 using Client Access. A Japanese compitable font was selected in the query anaylzer.

The odd thing is that in configuration (1), we were able to see the Japanese characters correctly which suggests that the HiT OLEDB provider has passed the information back to the PC correctly. And in configuration (2) and (3), we were able to show that SQL Server has no problem displaying Japanese characters regardless of its language edition.

We are not sure why it is behaving this way. Does anybody have any thought?

Here is the code used:

Code Sample One
===============
The following code was used on an English version of SQL Server 2000 running on an English version of Windows

2000 professional

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tblJap]') and OBJECTPROPERTY(id,

N'IsUserTable') = 1)
drop table [dbo].[tblJap]
GO

CREATE TABLE [dbo].[tblJap] (
[CID] [int] IDENTITY (1, 1) NOT NULL ,
[Jap] [nchar] (30) NOT NULL ,
[Eng] [char] (30) NOT NULL
) ON [PRIMARY]
GO

INSERT INTO tblJap (Jap, Eng) VALUES ('織田信長','Oda Nobunaga')
INSERT INTO tblJap (Jap, Eng) VALUES ('豊臣秀吉','Toyotomi Hideyoshi')
INSERT INTO tblJap (Jap, Eng) VALUES ('徳川家康','Tokugawa Ieyasu')
--See note below
GO

SELECT * FROM tblJap

Note
====
Another odd thing was that if I run the code
INSERT INTO tblJap (Jap, Eng) VALUES ('織田信長','Oda Nobunaga')
from query analyzer, the Japanese characters showed up as ? in Enterprise Manager. But if I edit the information again from Enterprise Manager, it shows up properly in both Enterprise Manager and Query Analyzer.

Results you are seeing might be due to the fact that you are inserting characters as regular chars and not as Unicode chars, and their translation (effectively truncation) is affected by Query Analyzer.

Instead of

INSERT INTO tblJap (Jap, Eng) VALUES ('...(Japanese chars)...','Oda Nobunaga')

try

INSERT INTO tblJap (Jap, Eng) VALUES (N'...(Japanese chars)...','Oda Nobunaga')

and see if that fixes your problem.

Regards,
Boris.

|||Your solution is working fine.

Problem Displaying Japanese Characters

We are a software developer here and ran into a problem trying to get SQL
Server Query Analyzer to display Japanese Characters fetched through a linked
server properly. Can someone comment on the situation?
The following configurations were able to display Japanese characters
properly:
================================================== ===
1. Write a C# application to get Japanese characters from an AS400 table
containing Japanese texts. The Japanese text was displayed on the DataGrid.
The provider used was HiT OLEDB Server/400. A 30 day eval copy can be
obtained from the following link:
http://www.hitsw.com/products_servic...b_svr_400.html
2. Create a table containing Japanese text on SQL Server A and create a
linked server on SQL Server B linking to SQL Server A. Change the font type
of SQL Server B's query analyzer to a font that is compatible with Japanese
character. (See the bottom of this message for the code used to create the
table on SQL Sever A)
3. On a new PC, install Japanese edition of Windows 2000 plus Japanese
Edition of SQL Server 2000. Create a linked server pointing to a Japanes
table on the AS400 using the HiT OLEDB provider.
The following configurations were not able to display Japanese characters
properly:
================================================== ===
i. On a PC with English version of Windows 2000 Professional and English
version of SQL Server, change the query analyzer font to a font that is
compitable with Japanese text and then use the HiT OLEDB provider to create a
linked server pointing to the Japanese table on the AS400.
ii. On the same PC above, install IBM Client Access and make a new linked
server pointing to the same Japanese table on the AS400 using Client Access.
A Japanese compitable font was selected in the query anaylzer.
The odd thing is that in configuration (1), we were able to see the Japanese
characters correctly which suggests that the HiT OLEDB provider has passed
the information back to the PC correctly. And in configuration (2) and (3),
we were able to show that SQL Server Query Analyzer has no problem displaying
Japanese characters regardless of its language edition.
We are not sure why it is behaving this way. Does anybody have any thought?
Here is the code used to generate the table on SQL Server:
Code Sample One
===============
The following code was used on an English version of SQL Server 2000 running
on an English version of Windows
2000 professional
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[tblJap]') and OBJECTPROPERTY(id,
N'IsUserTable') = 1)
drop table [dbo].[tblJap]
GO
CREATE TABLE [dbo].[tblJap] (
[CID] [int] IDENTITY (1, 1) NOT NULL ,
[Jap] [nchar] (30) NOT NULL ,
[Eng] [char] (30) NOT NULL
) ON [PRIMARY]
GO
INSERT INTO tblJap (Jap, Eng) VALUES ('織田信長','Oda Nobunaga')
INSERT INTO tblJap (Jap, Eng) VALUES ('豊臣秀吉','Toyotomi Hideyoshi')
INSERT INTO tblJap (Jap, Eng) VALUES ('徳川家康','Tokugawa Ieyasu')
--See note below
GO
SELECT * FROM tblJap
Note
====
Another odd thing was that if I run the code
INSERT INTO tblJap (Jap, Eng) VALUES ('織田信長','Oda Nobunaga')
from query analyzer, the Japanese characters showed up as ? in Enterprise
Manager. But if I edit the information again from Enterprise Manager, it
shows up properly in both Enterprise Manager and Query Analyzer.
Fabio,
Probably a problem with the way the HiT driver handles DBCS characters.
I suggest you try with StarSQL (www.starquest.com), it is another quite
reliable driver for DB2 and the support is pretty good.
Good luck,
Bob
Fabio Boscaini a =C3=A9crit :
> We are a software developer here and ran into a problem trying to get SQL
> Server Query Analyzer to display Japanese Characters fetched through a li=
nked
> server properly. Can someone comment on the situation?
> The following configurations were able to display Japanese characters
> properly:
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> 1. Write a C# application to get Japanese characters from an AS400 table
> containing Japanese texts. The Japanese text was displayed on the DataGri=
d=2E
> The provider used was HiT OLEDB Server/400. A 30 day eval copy can be
> obtained from the following link:
> http://www.hitsw.com/products_servic...db_svr_400.ht=
ml
> 2. Create a table containing Japanese text on SQL Server A and create a
> linked server on SQL Server B linking to SQL Server A. Change the font ty=
pe
> of SQL Server B's query analyzer to a font that is compatible with Japane=
se
> character. (See the bottom of this message for the code used to create the
> table on SQL Sever A)
> 3. On a new PC, install Japanese edition of Windows 2000 plus Japanese
> Edition of SQL Server 2000. Create a linked server pointing to a Japanes
> table on the AS400 using the HiT OLEDB provider.
> The following configurations were not able to display Japanese characters
> properly:
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> i. On a PC with English version of Windows 2000 Professional and English
> version of SQL Server, change the query analyzer font to a font that is
> compitable with Japanese text and then use the HiT OLEDB provider to crea=
te a
> linked server pointing to the Japanese table on the AS400.
> ii. On the same PC above, install IBM Client Access and make a new linked
> server pointing to the same Japanese table on the AS400 using Client Acce=
ss.
> A Japanese compitable font was selected in the query anaylzer.
> The odd thing is that in configuration (1), we were able to see the Japan=
ese
> characters correctly which suggests that the HiT OLEDB provider has passed
> the information back to the PC correctly. And in configuration (2) and (3=
),
> we were able to show that SQL Server Query Analyzer has no problem displa=
ying
> Japanese characters regardless of its language edition.
> We are not sure why it is behaving this way. Does anybody have any though=
t?
> Here is the code used to generate the table on SQL Server:
> Code Sample One
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> The following code was used on an English version of SQL Server 2000 runn=
ing
> on an English version of Windows
> 2000 professional
> if exists (select * from dbo.sysobjects where id =3D
> object_id(N'[dbo].[tblJap]') and OBJECTPROPERTY(id,
> N'IsUserTable') =3D 1)
> drop table [dbo].[tblJap]
> GO
> CREATE TABLE [dbo].[tblJap] (
> [CID] [int] IDENTITY (1, 1) NOT NULL ,
> [Jap] [nchar] (30) NOT NULL ,
> [Eng] [char] (30) NOT NULL
> ) ON [PRIMARY]
> GO
> INSERT INTO tblJap (Jap, Eng) VALUES ('=E7=B9=94=E7=94=B0=E4=BF=A1=E9=95=
=B7','Oda Nobunaga')
> INSERT INTO tblJap (Jap, Eng) VALUES ('=E8=B1=8A=E8=87=A3=E7=A7=80=E5=90=
=89','Toyotomi Hideyoshi')
> INSERT INTO tblJap (Jap, Eng) VALUES ('=E5=BE=B3=E5=B7=9D=E5=AE=B6=E5=BA=
=B7','Tokugawa Ieyasu')
> --See note below
> GO
> SELECT * FROM tblJap
> Note
> =3D=3D=3D=3D
> Another odd thing was that if I run the code
> INSERT INTO tblJap (Jap, Eng) VALUES ('=E7=B9=94=E7=94=B0=E4=BF=A1=E9=95=
=B7','Oda Nobunaga')
> from query analyzer, the Japanese characters showed up as ? in Enterpr=
ise
> Manager. But if I edit the information again from Enterprise Manager, it
> shows up properly in both Enterprise Manager and Query Analyzer.

Problem displaying image data from SQL Server

Hello,

I'm having problems saving and then displaying binary data in sql server.

I have a form that takes a file specified by the user and inserts this into sql server:

protected void btnUploadFile_Click(object sender, EventArgs e)
{
if (theFile.PostedFile != null)
{
if (theFile.PostedFile.ContentLength > 0)
{
byte[] docBuffer = new byte[theFile.PostedFile.ContentLength];
Response.Write(theFile.PostedFile.ContentType.ToString());

if (docBuffer.Length > 0)
{
// save to db
DbAccess dbAccess = new DbAccess(); // my helper function for all db access etc

try
{
dbAccess.BuildCommand("Incentives_SaveDocument");
dbAccess.Parameters.Add("@.docImage", SqlDbType.Image).Value = docBuffer;
dbAccess.ExecuteNonQuery();
}
catch (Exception ex)
{
Response.Write(ex.ToString());
}
}
}
}
}

Stored proc:

ALTER PROCEDURE Incentives_SaveDocument
@.docImage image
AS
SET NOCOUNT ON

INSERT INTO Table1 (theData) VALUES (@.docImage)

RETURN

This appears to work fine. I store the binary data in a image column and if I query the db it shows the row as <Binary>.

The problem I have is with retrieving the data and saving it to a file. The file saves OK but when I open it is contains lots of "squares" that I suppose are the binary - it doesn't show the text.

The code for retrieving/displaying the doc is:

protected void btnView_Click(object sender, EventArgs e)
{
DbAccess dbAccess = new DbAccess();
byte[] byteArray = null;

try
{
dbAccess.BuildCommand("Incentives_RetrieveDocument");
dbAccess.Parameters.Add("@.id", SqlDbType.Int).Value = 6; // id for the doc to return
SqlDataReader reader1 = dbAccess.ReturnDataReader();

while (reader1.Read())
{
if (reader1.HasRows)
{
byteArray = (byte[])reader1["theData"];
}
}
reader1.Close();

FileStream fs = new FileStream("file1", FileMode.CreateNew, FileAccess.Write);
fs.Write(byteArray, 0, byteArray.Length);
fs.Flush();
fs.Close();

FileInfo fileInfo = new FileInfo("file1");

HttpContext.Current.Response.Clear();
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + fileInfo.Name);
HttpContext.Current.Response.AddHeader("Content-Length", fileInfo.Length.ToString());
HttpContext.Current.Response.ContentType = "application/msword";
HttpContext.Current.Response.WriteFile(fileInfo.FullName);
HttpContext.Current.Response.End();

}
catch (Exception ex)
{
Response.Write(ex.ToString());
}
finally
{
dbAccess.CloseDbConnection();
}

The stored proc:

ALTER PROCEDURE Incentives_RetrieveDocument
@.id int
AS
SET NOCOUNT ON

SELECT * FROM Table1 WHERE id = @.id

RETURN

I would be grateful for any advice on this - its the first time I've worked with BLOB data.

Thanks

SiWhen you recreate a file from the image stored on the database, does it have the same extension?|||

Hello,

I've worked out what is was. I was uploading a byte array without the binary data in it. I needed the following to get it to work:


Stream dataStream = theFile.PostedFile.InputStream;
byte[] docBuffer = new byte[theFile.PostedFile.ContentLength];
int n = dataStream.Read(docBuffer, 0, theFile.PostedFile.ContentLength);

Si

Problem displaying dynamic images in runtime

Hi,

My problem is that when i make a preview or print the report on runtime, using crviewer, the pictures that i inserted dynamicaly appear shrunk on the top left side of the picture box. Its not the picture box that shrinks its only the image.

The only way to make the image use all the box is by enabling the can grow option but thats not what i need, i need all the pics of the same size.

PS: by the tests i made it seems that crystal is making the stretch in wrong way, calculating how mutch it should shrink the image right but using it on the size of the box instead of using it on the size of the image :P.

If any one has this problem or the solution ...

THANKS!!!Even I have a similar issue. I am using CR XI for .Net.

I have .XSD file as a datasource to my CR at design time. This TypedDataset(.XSD) has got a column. ImageBinary. which holds the binary data of the image and two more columns which have the height and the width of the image.

I drag and drop this ImageBinary column at design time.

At runtime I am able to display the image in this CR's blob field, but I am unable to resize it as per the height and width provided.

It will be of great help if any one could please let me know in Crystal Report how to resize the BLOB field at runtime.

Regards
Lalit