Cannot Read The Next Data Row For The Data Set

Apr 20, 2007



I have followed all the links posted on this forum regarding this error and done evrything that has been suggested, but still I am getting this error.



An error has occurred during report processing.

Cannot read the next data row for the data set dsXXXXX.

Invalid attempt to NextResult when reader is closed.

Please help.

View 2 Replies


ADVERTISEMENT

Pipeline Error-excel Source-data Reader Does Not Read In Meta Data

Apr 16, 2008

Hi all, i got this error:


[DTS.Pipeline] Error: "component "Excel Source" (1)" failed validation and returned validation status "VS_NEEDSNEWMETADATA".

and also this:

[Excel Source [1]] Warning: The external metadata column collection is out of synchronization with the data source columns. The column "Fiscal Week" needs to be updated in the external metadata column collection. The column "Fiscal Year" needs to be updated in the external metadata column collection. The column "1st level" needs to be added to the external metadata column collection. The column "2nd level" needs to be added to the external metadata column collection. The column "3rd level" needs to be added to the external metadata column collection. The "external metadata column "1st Level" (16745)" needs to be removed from the external metadata column collection. The "external metadata column "3rd Level" (16609)" needs to be removed from the external metadata column collection. The "external metadata column "2nd Level" (16272)" needs to be removed from the external metadata column collection.


I tried going data flow->excel connection->advanced editor for excel source-> input and output properties and tried to refresh the columns affected.
It seems that somehow the 3 columns are not read in from the source file?
ans alslo fiscal year, fiscal week is not set up up properly in my data destination?
anyone faced such errors before?

Thanks

View 13 Replies View Related

XML Data Source .. Expression? Variable? Connection? Error: Unable To Read The XML Data.

Feb 23, 2008

RE: XML Data source .. Expression? Variable? Connection? Error: unable to read the XML data.

I want my XML Data source to be an expression as i will be looping through a directory of xml files.

I don't see the expression property or the connection property??

I tried setting the XMLData property to @[User::filename], but that results in:

Information: 0x40043006 at Load XML Files, DTS.Pipeline: Prepare for Execute phase is beginning.
Error: 0xC02090D0 at Load XML Files, XML Source [108]: The component "XML Source" (108) was unable to read the XML data.
Error: 0xC0047019 at Load XML Files, DTS.Pipeline: component "XML Source" (108) failed the prepare phase and returned error code 0xC02090D0.
Information: 0x4004300B at Load XML Files, DTS.Pipeline: "component "OLE DB Destination" (341)" wrote 0 rows.
Task failed: Load XML Files
Information: 0xC002F30E at Bad, File System Task: File or directory "d:jcpxmlLoadjcp2.xml.bad" was deleted.
Warning: 0x80019002 at Package: The Execution method succeeded, but the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "Package.dtsx" finished: Failure.
The program '[3312] Package.dtsx: DTS' has exited with code 0 (0x0).


Thanks for any help or information.

View 3 Replies View Related

Report Builder - Read Data From SQL Server With Ntext Data Type

Apr 16, 2008

Hi all,

I have a column in SQL server which is of type ntext. Selecting the specific column to view it in report builder, an error message appears with the following description:

- Cannot run this report. The grouping expression 'nameofcolumn' returns the datatype binary. The Grouping Expression cannot return binary data.

Report Builder recognises this as if it was an image...

Thanks in advance!

View 2 Replies View Related

Reporting Services :: How To Read Data (email) From Report In Data Driven SSRS Subscriptions

Jul 28, 2015

get the data from report to create data driven SSRS Subscriptions,

write query :

Running Report:

View 5 Replies View Related

SQL Security :: Making Data Change In Read Only Database Without Letting Other Users Update Data

Aug 6, 2015

I want to make data changes in read_only database , that's why i must set database read_write. While database is at read_write mode, i want to be sure that no one makes change in database.

For this aim, i write the code below, but i suspect that after setting the database read_write, till the setting database
single_user ,is it possible get DML script from another user. Is the code below enough for this operation. Or is there another way?

Reminding: Read_only database can not be set single_user mode. That's why, first you must set database read_write.

The code;

use master
alter database xxx set read_write
with rollback immediate
alter database xxx set single_user
with rollback immediate

use xxx
update  tablexxx set columnxxx=yyy
use master
alter database xxx set read_only
with rollback immediate
alter database xxx set multi_user
with rollback immediate

View 5 Replies View Related

How Can I Read Data From XML-file With Exported Data From MS Access.

Oct 29, 2007


How can I read data from XML-file with exported data from MS Access? Which a dataflow component do I have to use?

Thanks in advance.

View 1 Replies View Related

Error: Cannot Read The Next Data Row For The Data Set

Jan 21, 2008

Hi all,

I have noticed quite a few other posts about this error. My feeliing is that it has various causes requiring different remedies. I could not find anything suitable for my situation, so I post this in case someone can offer some tip.

The error happens during subscription report generation.

The following is from the SRS's log file:

ReportingServicesService!runningjobs!14!1/21/2008-10:35:37:: w WARN: Thread pool pressure. Using current thread for a work item.
ReportingServicesService!runningjobs!c!1/21/2008-10:36:28:: i INFO: Adding: 2 running jobs to the database
ReportingServicesService!library!c!1/21/2008-10:41:28:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams
ReportingServicesService!runningjobs!c!1/21/2008-10:48:28:: i INFO: RunningJobContext.IsExpired; found expired request
ReportingServicesService!processing!c!1/21/2008-10:48:28:: i INFO: Merge abort handler called for ID=-1. Aborting data sources ...
ReportingServicesService!runningjobs!c!1/21/2008-10:48:28:: i INFO: RunningJobContext.IsExpired; found expired request
ReportingServicesService!processing!8!1/21/2008-10:48:28:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: Report processing has been canceled by the user. , ;
Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: Report processing has been canceled by the user.
ReportingServicesService!processing!8!1/21/2008-10:48:28:: w WARN: Data set 'ICParamAll': Report processing has been aborted.
ReportingServicesService!processing!19!1/21/2008-10:48:28:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: Report processing has been canceled by the user. , ;
Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: Report processing has been canceled by the user.
ReportingServicesService!processing!19!1/21/2008-10:48:28:: w WARN: Data source 'eConsole': Report processing has been aborted.
ReportingServicesService!processing!19!1/21/2008-10:48:28:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: Report processing has been canceled by the user. , ;
Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: Report processing has been canceled by the user.
ReportingServicesService!processing!10!1/21/2008-10:48:28:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot read the next data row for the data set ICParamAll., ;
Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot read the next data row for the data set ICParamAll. ---> System.Data.SqlClient.SqlException: Operation cancelled by user.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.HasMoreRows()
at System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout)
at System.Data.SqlClient.SqlDataReader.Read()
at Microsoft.ReportingServices.DataExtensions.DataReaderWrapper.Read()
at Microsoft.ReportingServices.DataExtensions.MappingDataReader.GetNextRow()
--- End of inner exception stack trace ---



Any tip will be greatly appreciated.

View 2 Replies View Related

Read Data From Log

Jul 21, 2006

hi all

how i can read all the querys that send to the server

exmple

insert , update statement need all this statement at the end of the day how can i do that by sqlserver

thanks alot

View 5 Replies View Related

How To Read From Sql Data Set

Sep 13, 2007

Code Snippet
Dim ds As New DataSet
Dim adp As New SqlDataAdapter("Select MaxID,ValueName from tblSettings where ID=1", cn)

adp.Fill(ds)
If IsDBNull(ds.Tables(0).Columns("MaxID")) Then

GetMaxID = 1
Else

GetMaxID = ds.Tables(0).Columns("MaxID")
End If


the ds.Tables(0).Columns("MaxID") showing a value like this. ( Please tell how to read from sql data set)

{System.Data.DataColumn}

AllowDBNull: True

AutoIncrement: False

AutoIncrementSeed: 0

AutoIncrementStep: 1

Caption: "MAxid"

ColumnMapping: Element {1}

ColumnName: "MAxid"

Container: Nothing

DataType: {Name = "Decimal" FullName = "System.Decimal"}

DateTimeMode: UnspecifiedLocal {3}

DefaultValue: {System.DBNull}

DesignMode: False

Expression: ""

ExtendedProperties: Count = 0

MaxLength: -1

Namespace: ""

Ordinal: 0

Prefix: ""

ReadOnly: False

Site: Nothing

Table: {System.Data.DataTable}

Unique: False



View 1 Replies View Related

XML Data Read Help

Sep 12, 2007

I am having issues in figuring out how to read part of an XML file and I'm not sure if it can be done. Any and all help would be appreciated.

I have a file resembled this way:



<btb-root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" btb-num-trans="2"
btb-date="2006-11-09" btb-time="22:40:03" btb-sender="TTT"
btb-receipient="Test">
<btb-request req-method="Asynchronous">
<req-header>
<req-btb-id>Test</req-btb-id>
<req-client-id>Test</req-client-id>
<req-product>Test</req-product>
<req-loan-number>Test</req-loan-number>
</req-header>
<req-property-address>
<addr1>Test DR</addr1>
<city>Test</city>
<state>Test</state>
<zip>Test</zip>
</req-property-address>
<req-borrowers borr-type= "Borrower">
<first-name>Test</first-name>
<last-name>test</last-name>
</req-borrowers>
</btb-request>
</btb-root>

I am in need of extracting the date "2006-11-09" to a field in an import table contained in a sql database. I can pull all the other fields I need but in SSIS retrieving the date is not an option that I currently see. Does anyone know a way around this?

Thanks

View 11 Replies View Related

Cannot Read The Next Data Row For The Data Set Abc.

Feb 7, 2007

Dear All.

I am facing the above mentioned error quite frequently. I am using SQL 2005 reporting services and my database is in SQL 2005. I am using a stored procedure and pass the parameters to the SP through the report. The SP returns the results in about 4-5 seconds at max but when the report is run, it usually takes a long time for processing and then it throws the following error:

Cannot read the next data row for the data set ABC. A severe error occurred on the current command. The results, if any, should be discarded.

Can anyone from Microsoft please specify the exact reason for this error and how can we solve it?

Also there is another problem, some of my reports use SPs. When the SPs are run independantly, they return the results efficiently in about 2-3 seconds but when the report is run using the same SPs, the report returns the results in 2-3 minutes. Any reasons? Any configuration change that may be required for reporting server?

Thanks in advance.

Kashif

View 8 Replies View Related

Cannot Read The Next Data Row For The Data Set

May 31, 2006

Hello all. I am getting the error "Cannot read the next data row for the data set" Then it further states "ERROR [IM001][Microsoft][ODBC Driver Manager] Driver does not support this function"

I am trying to connect to an ODBC database that I have set up through Transoft ODBC 3.10.00.303 from 3/30/1999.

I am able to execute my query and receive data from my source, but when I try to preview my report I receive this error.

Thanks!



BJ

View 3 Replies View Related

Cannot Read The Next Data Row For The Data Set

Mar 22, 2006

Hi,

My report runs fine when I view in VS, data shows fine when I run the query in the data window, but when I publish it to the server, I get the above error. I am running SQL server 2005 RTM and I have re-deployed the entire solution.

Any ideas?

View 23 Replies View Related

Converting Read Only Data From SQL 6.5 To SQL 7

Aug 11, 2000

I am using SQL 6.5 and we are going to upgrade to SQL 7. Has anyone
had any experience converting "read only" data? If so, I am looking
for tips and tricks. thanks in advance.

View 1 Replies View Related

Read Data From File Imp Into MS-SQL

Mar 24, 2006

Hi,

Ik like to read data from a file (well formatted) into as MS-SQL database.

What is the best way to do this.

Jim

View 1 Replies View Related

Cannot Re-read Data In Column 2

May 18, 2004

Hi,

I'm connecting to my SQL Server via Java in my Notes environment, but when I try to update my Notes-documents I get an error fra SQL Server saying that it can not re-read data from column 2.

Without being absolutely certain - I'm quite sure that the code is valid.

Does anyone know what the error means ?

Thanks in advance

Kim Hansen

View 1 Replies View Related

Is It Possible If I Want To Read The Backup Data

Jan 28, 2008

hi all
right now , i am still learning how to use sql2005

is it possible if i want to read the backup data without restoring the backup database.? if it possible can you show me how to do it



cheers Arif

arifliminto86

View 6 Replies View Related

READ UNCOMMITTED Data

Apr 23, 2007

1. In this topichttp://groups.google.com/group/comp...b21516252b65e7c,someone wrote: "I've implemented SET TRANSACTION ISOLATION LEVEL READUNCOMMITTED at the beginningof a number of stored procedures and, then SET TRANSACTION ISOLATIONLEVEL READCOMMITTED at the end to minimize the disruption to the application.".My question is, do you really need to set READ COMMITTED at the end ofstored procedure? What scope does that command affect?2. Could someone write some real world example where i should neverread uncommitted data... i'm having trouble understanding when ishould and when i should not use it.

View 7 Replies View Related

How To Share Read Only Data

Jun 15, 2007

Hi,



I'm new to replication. Can anyone help with the following?



I want to publish the specific rows of data that are created on the publisher without accepting changes to those rows from subscribers, but do accept new rows (and changes to those rows) from subscribers.



EG. publisher creates rows 1 and 2 which are published to the subscriber

subscriber creates rows 3 and 4 which are merged back to the publisher

subscriber's updates (or delets) to rows 1 and 2 are not merged back to the publisher



So basically I want the publisher created rows to be published but remain as is whilst allowing subscriber created rows to be merged back to the publisher.



Hope is makes sense.



Thanks in advance,



Seedsy

View 5 Replies View Related

How To Get Read Only Control Value Through SQl Data Source

Nov 7, 2006

Hello,
I am using this sql data source control.
<asp:textbox runat="server" id="txtFromDate" ReadOnly="true"></></asp:textbox>
 
<asp:textbox runat="server" id="txtToDate" ReadOnly="true"></asp:textbox>
--------------------------------->
<asp:sqldatasource id="dsClickInfo" runat="server" connectionstring="<%$ ConnectionStrings:activeConnectionString %>"
selectcommand="SProc_GetTransaction" selectcommandtype="StoredProcedure">
<SelectParameters>
<asp:QueryStringParameter QueryStringField="Id" Name="MerchantID" Type="int32" />
<asp:ControlParameter ControlID="txtFromDate" Name="StartDate" PropertyName="Text"
Type="String" DefaultValue="0" />
<asp:ControlParameter ControlID="txtToDate" Name="EndDate" PropertyName="Text"
Type="String" DefaultValue="0" />
</SelectParameters>
 
</asp:sqldatasource>
I abouve code txtFromDate and txtToDate are marked as readonly so sqldatasource is not able to get value from these controls.
How is it possible?
Please help me..

View 3 Replies View Related

.Read() Not Able To Get Data With Special Caracter

Dec 8, 2006

Hi all,
My SQL database has varchar that store names with special caracter like "René". The problem is when I try to get the data back from the database, the .Read() command from the SqlDataReader object is not working. In extra, it does not Throw any error????????
Please help me,
JR

View 3 Replies View Related

Read Image Data From SQL Server

Sep 19, 2007

Here is my task  I am storing pdf's in sql server. I would like to retrieve the binary data from sql server and write the pdf content into an existing aspx page to the appropriate pageview section.  What is the best way to handle this.  The code works below but it loads a new browser with the content.  I need it to appear in it's tabbed section in the original aspx file.  Any assistance you can give me would be greatly appreciated.
 Thanks Jerry
oSQLConn.Open()Dim myreader As SqlDataReader
myreader = myCommand.ExecuteReader
Response.Expires = 0
Response.Buffer = True
Response.Clear()
Do While (myreader.Read())
Response.ContentType = ("application/pdf")Response.BinaryWrite(myreader.Item("img_content"))
Loop

View 5 Replies View Related

Data Read-Consistency During Update

Sep 27, 2007

Hi folks,I have 3 tables of related data in SQL 2000/2005 that receive periodic adds/updates every 30 seconds.I have enabled transactions on all updates, is anything else needed to ensure data consistency during reads in a high # of fetches per second situation?Thanks,johnEdit:Clarification -- I just need the data to be correctly displayed to all users. 

View 2 Replies View Related

How Can I Read From Image Data Type

May 11, 2001

I want to store my MS-Word documents and Excel sheets in the database. So, i have used
the image datatype. Iam not able to download the documents from the database.
i have used getBytes() method. But when i try to download excel sheet document, i get
a error message saying, "File error: data may have been lost".
Can i get some help. can u say how can i put word and excel docs in the database and
retrieve it.
regards,
sathish

View 2 Replies View Related

Read Only User On Data Base

Jan 29, 2004

I'm sure this is a really easy one but I want to create a user with read only access on a sql 2000 database using SQL authentication.

I'm building a little pilot DB system and I have a trainee developer who I want to built me some queries for crystal reports. But I dont want them to be able to amend/delete data or tables etc.

I've created the user but how to I set it to read only. Also will the user still have read only rights if the user has access to the database via enterprize manager/Query analysier.

thanks,

View 5 Replies View Related

Read Commited Data With Out Lock

May 20, 2008

Hi All

Is there a way in SQL to query the data with out locking.

My intention is to read commited data with out locking

Thanks

View 8 Replies View Related

Read Data From Two Files Simultaneously

Oct 17, 2007

Hello,

I have 2 tables EmployeeA(Eng) and EmployeeB(Spanish) kept in seperate mdb's. I want to add the records into Sql Server 2005 table called StateEmployee.

Procedure:
1. Loop through 2 folders..one containing table EmployeeA in mdb and other containing tbl EmployeeB in diff mdb's.
2. Pick a file from EmployeeA and EmployeeB, both at the same time.
3. Count the total no of rows in both files. If equal proceed.
4. Compare the 'employeeid' of one row of employeeA to the employeeid of EmployeeB.
5. If employee id matches, load both the rows in Sql server else file it to the error table.
6. Loop through all rows simultaneously till end of row.
7. Go to next mdb.

How do i go about this step by step. I am fairly new to SSIS.

View 1 Replies View Related

Read Binary Data From SQL Server

Oct 19, 2007

hello.
i have a _CommandPtr that has the type CommandTypeEnum::adCmdTex, and the CommandText a query("Select * from Table_1") and this select returns one row that has a binary data in it.




Code Block

_CommandPtr pCommand;
//Create the C++ ADO Command Object

pCommand.CreateInstance(__uuidof(Command));

pCommand->ActiveConnection = this->pConnection;

//Make the ADO C++ command object to accept stored procedure

pCommand->CommandType = CommandTypeEnum::adCmdText;

//Tell the name of the Stored Procedure to the command object

pCommand->CommandText = _bstr_t("select * from Table_1");

//get recordset
pRecordset = pCommand->Execute(NULL,NULL,CommandTypeEnum::adCmdText);

BYTE* buffer = NULL;
if(pRecordset != NULL)
{

while (!pRecordset->GetEndOfFile())
{

VARIANT var = pRecordset->Fields->GetItem("test")->Value;

void * pData = NULL;
SafeArrayAccessData(var.parray, &pData);
long size = GetArraySize(var, NULL);
buffer = new BYTE[size];
memcpy(buffer, pData, size);
SafeArrayUnaccessData(var.parray);
pRecordset->MoveNext();
}
pRecordset->Close();
}

where:



Code Block
long GetArraySize(const VARIANT& var, long * nElems)
{

if ( !(var.vt & VT_ARRAY) ) return -1;

long size = 0;
long dims = SafeArrayGetDim(var.parray);
long elemSize = SafeArrayGetElemsize(var.parray);
long elems = 1;
for ( long i=1; i <= dims; i++ )
{

long lbound, ubound;
SafeArrayGetLBound(var.parray, i, &lbound);
SafeArrayGetUBound(var.parray, i, &ubound);
elems *= (ubound - lbound + 1);
}
if ( nElems ) *nElems = elems;
size = elems*elemSize;
return size;
}






I enter in VARIANT var = pRecordset..... and if gives me a value... but when I put it in Memory explorer in VS, i only see this data " fe ee fe ee fe ee fe ee fe ee fe ee fe ee ...fe ee" and of course it brakes at
SafeArrayGetLBound(var.parray, i, &lbound);

Can someone tell me where I am doing a very bad thing?

P.S. I was able to read the binary data from the server using C#.NET 2.0.

View 1 Replies View Related

To Read Sql Server Data In Oracle

Jun 22, 2007

I have an ORACLE server say "A". I have a SQL Server named "B". In SQL Server I have a table named "test" who contains only one field named "aa" which is "BIT" type field. I want to query this table of "B" from "A" interface through Oracle's DB Link and ODBC dsn for Sql Server. But it gives error. If I changed the data type of field "aa" to "int", then it reads easily. Please suggest.

View 7 Replies View Related

Invalid Attempt To Read When No Data Is Present.

Apr 23, 2008

I'm writing my first .net app in VB.net.  I can connect to my database, but get the following error when I try to set a label value.  (My code is listed below)  What am I missing? 
Exception Details: System.InvalidOperationException: Invalid attempt to read when no data is present.Source Error:



Line 19:
Line 20: reader = comm.ExecuteReader()
Line 21: EmployeesLabel.Text = reader.Item("tkinit")
Line 22:
Line 23: reader.Close()
 <%@ Page Language="VB" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Configuration" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim conn As SqlConnectionDim comm As SqlCommand
Dim reader As SqlDataReaderDim connectionString As String = ConfigurationManager.ConnectionStrings("IntegratedDataConnectionString").ConnectionString
 conn = New SqlConnection(connectionString)
 comm = New SqlCommand("Select top 1 tkinit from tEliteTimeKeep", conn)
conn.Open()
 
reader = comm.ExecuteReader()EmployeesLabel.Text = reader.Item("tkinit")
 
reader.Close()
conn.Close()
 End Sub
</script><html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"><title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
 
<asp:Label ID="EmployeesLabel" runat="server" ></asp:Label>
 
</div></form>
</body>
</html>

View 3 Replies View Related

Invalid Attempt To Read When No Data Is Present.

May 16, 2008

My query actually returns rows but when I run, I get this error "Invalid attempt to read when no data is present". It says that the datareader does not return any rows.
Please help.
Thanks in advance
Sangita

View 5 Replies View Related

Image Data Read From SQL Server Does Not Show Up

Mar 4, 2004

Hi Guys,

I've been strugling with this problem all morning today.

Basically I store images in SQL Server 2000 database and then whould like to show them with

<img src="viewImage.aspx?image_id=10" border=1>


My table structure is setup this way

TABLE [userImages] (
[imageFilename] [nvarchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[imageContentType] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[imageFileSize] [bigint] NULL ,
[imageFileImage] [image] NULL )


and in viewImage.aspx I have:

if (dr.Read())
{

Response.ContentType = dr.GetString(dr.GetOrdinal("imageContentType"));
Response.BinaryWrite( (byte[]) dr["imageFileImage"] );
}


I have no prolems retrieving the data from DB. But the image does not display(in IE it shows a broken link image)

What's even more puzzling is I CAN display the same image from HDD like so:

FileStream fs = File.OpenRead("D:\my_image.png");
byte[] buffer = new byte[fs.Length];
fs.Read(buffer, 0, buffer.Length);
fs.Close();

Response.ContentType = "application/octet-stream";
Response.BinaryWrite(buffer);


Am I missing something very obvious. I tried playing around with different ContentType's same result.

In my case I am forced to store images in the DB.

I've seen other examples on the net and theirs work. Please help.

Sincerely,
Vlad Orlovsky

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved