.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

pdf reader

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :.NET Framework
i want to read a  pdf file how to do it.pls give me code.i am using c#.net.rather than links pls give me code here

View Complete Post

More Related Resource Links

Use Camera as Barcode Reader

some important links



reader.getordinal("column_may_not_exist") how to catch the exception?



would any body please help me to catch the exception if the column doesnot exist as my table columns are not static.

sometimes its throwing me indexoutofrange exception as the column doesnot exist

thanks for the help guys

Concurrent Affairs: Reader/Writer Locks and the ResourceLock Library


If multiple threads concurrently execute code that writes to or modifies a resource, then obviously the resource must be protected with a thread synchronization lock to ensure that the resource doesn't get corrupted.

Jeffrey Richter

MSDN Magazine June 2006

Editor's Note: Reader E-mail


Here at MSDN Magazine, we get a lot of mail from readers. As you can imagine, much of it involves fulsome praise for our content, our eye-catching covers, or the handsome photo that now graces this page.

Joshua Trupin

MSDN Magazine June 2005

Linq2Sql error: "Invalid attempt to call Read when reader is closed."


I've read up on this error from other posts and on other sites, but haven't found a solid resolution to the issue yet. My setup is as follows:

I have a RepositoryBase class that fields certain db calls that all repositories need to perform. In one such call, "GetSecurityGroup", it works most of the time, but will seemingly at random throw an exception with the error "Invalid attempt to call Read when reader is closed." All other Repository classes inherit from this one, and they all use the same DataContext object, which I understand isn't thread safe. Since there could be multiple calls to the DataContext object on the same page, perhaps one is using the DataContext when the next tries to do so. I'm not sure. What can I do to ensure this doesn't happen?

How do I determine null with ADO reader?

I am using ADO reader to read rows in a table with matching values in two columns.  But when the reader has rows and one of the columns in a row is null instead of a long number, I get an error when I attempt to access the value.  In C# language, I have a statement that says "if (reader["Example"] != null) ExampleID = (long)reader["Example"];".  Unfortunately, the "if" statement does not detect the null value in the column and it attempts to store null in the "ExampleID" long variable and an error states "Specified cast is not valid.  When casting from a number, the value must be a number less than infinity."  What should I do to prevent accessing a null value?   Maurice

Data Reader Destination issue

Hi, I'm new to BI, I created a package to test the data reader destination the dtsx is executing well every thing is green but what after that. The question is how to use this Data reader destination? As I know as a .net programmer there  is a class named data reader that could be used to retieve data in connected mode programmatically using a  connection and a command objects, but in the case of data reader destination how to use it. Or am I confusing the data reader that I kno in the ADO .Net with this one used in BIDS  Should I add a script task after the data reader destination or should I consume this data reader within my proper separate code with a dll or an exe that I create as a .Net project ? For instance, two properties are remaquables for me those are locted within the custom proeprties  datareader and  usercomponentdatatype   The complexity resides in the simplicity

Twitter reader

Dear all,I have writing software Twitter reader by C# and reading from this link http://twitter.com/statuses/friends_timeline.xml , in the first time my soft run very good but since Twitter to change system to authentication account then my soft not work.Code twitter reader I used:        client = new WebClient(); client.Credentials = new NetworkCredential(user, pass); stream = client.OpenRead(APILink); reader = new StreamReader(stream); xml_read = new XmlTextReader(reader); xml_Doc = new XmlDocument(); xml_Doc.Load(xml_read); Please help me this problem.Thanks a lot,My email: kieungocdung@hotmail.com

Log Reader Error: The process could not execute 'sp_repldone/sp_replcounters'

I have transactional replication going between servers A and B. SQL Server 2005 64 bit A is Publisher B is Distributor and Subscriber Now I am getting the following Log reader Agent Error Msg The process could not execute 'sp_repldone/sp_replcounters' on 'A'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20011) Get help: http://help/MSSQL_REPL20011 Only one Log Reader Agent or log-related procedure (sp_repldone, sp_replcmds, and sp_replshowcmds) can connect to a database at a time. If you executed a log-related procedure, drop the connection over which the procedure was executed or execute sp_replflush over that connection before starting the Log Reader Agent or executing another log-related procedure. (Source: MSSQLServer, Error number: 18752) Get help: http://help/18752 The process could not set the last distributed transaction. (Source: MSSQL_REPL, Error number: MSSQL_REPL22017) Get help: http://help/MSSQL_REPL22017 The process could not execute 'sp_repldone/sp_replcounters' on 'A'. (Source: MSSQL_REPL, Error number: MSSQL_REPL22037) Get help: http://help/MSSQL_REPL22037 Can anybody help me in solving this issue? I read that we have to delete the existing publication and subscription.  Is there any way to solve this problem without deleting the existing subscription and publication Any help would be appreciated Thanks

Putting Gridview into editmode having datasource=reader

 I have a GV that is populated via a reader: Using reader As SqlDataReader = cmd.ExecuteReader() I have autogenerate edit button=T but it will not go into editmode. Must I create template to handle this?  

Is there an Sharepoint Server 2010 add-on download to make Adobe Acrobat Reader....readable?

I'd like to be able to make the occasional Adobe Acrobat Reader document available for viewing on our Sharepoint Server 2010.  How do I do this?

'System.Data.SqlClient.SqlParameterCollection' does not contain a definition for 'reader' and no

I thought I'd be able to re-use reader to exec one stored procedure, get a value, and then run another stored procedure.  But, argh, I'm getting this error 'System.Data.SqlClient.SqlParameterCollection' does not contain a definition for 'reader' and no extension method 'reader' accepting a first argument of type 'System.Data.SqlClient.SqlParameterCollection' could be found (are you missing a using directive or an assembly reference?) protected void getSectionContent() { SqlConnection conn = default(SqlConnection); SqlCommand comm = default(SqlCommand); SqlDataReader reader = default(SqlDataReader); string connectionString = ConfigurationManager.ConnectionStrings["123456"].ConnectionString; conn = new SqlConnection(connectionString); comm = new SqlCommand(); comm.Connection = conn; comm.CommandType = System.Data.CommandType.StoredProcedure; comm.CommandText = "proc_GetSectionDetails"; comm.Parameters.AddWithValue("SubSectionID", Request.QueryString["SubSectionID"]); conn.Open(); reader = comm.ExecuteReader(); if (reader.Read()) { lblName.Text = Convert.ToString(reader["SubSectionName"]); lblDesc.Text = Convert.ToString(reader["SubSe

flow doc reader showing 2 pages on 1 page view mode

Got a question about a flow doc reader. I'm using it for a report page and its main purpose is its scroll mode.  However, I'm wanting to use its 1 page mode for a print preview kind of thing.  If i have the flow docs page size set to roughly 8.5" x 11" the one page mode displays it perfectly to how it would be printed.  If i change the page size to a landscape format roughly 11" x 8.5" the doc reader crams everthing in on one page. Question is: Can you modify the doc readers one page mode to display pages as they would be printed? If not is there a way you can set up a print preview dialog with the flow doc?  Thats equally as good. Another random question.  When I call the flowdocreader.print method it displays a print dialog.  Problem is the close button on the dialog lines up with the print button on the toolbar.  If you try to close the dialog it clicks through the print dialog and hits print again.  This causes an infinite amount of print dialogs to appear and you have to close each one of them with cancel.   Is there a way to set focus to the print dialog or change its start up postition. Any feed back will be greatly appreciated.

data reader problem


i have a sql table like

name      toffees

rajeev     12

raj           14

rajeev     16

now  the following code i have in aspx.cs

sqlcommad cmd=n ew sqlcommad("select sum(toffee) from table where name='ravi'");

sqldatareader dr=cmd.executereader();









problem cms here even there is no name in table with ravi still dr reads when i debug my programm and show me null excepton as it returns null value form table.why it is not going in else part


someone pls help me??????????

Log Reader Agent Access Violation


I recently set up transactional replication from one server database to another server database.  I keep getting a Log Reader Agent error:  An access violation occurred. 

The SQL Server agent starts under one Windows account but the Server is registered under the system account.  The log reader agent is using the system account.

I'm not sure what else to check or what database permissions or roles should be set.  Can somebody help?  Thanks.

When to use 'reader' versus a datatable, table adaptor?


I'm making the leap from using all the 'wizards' that are built into VS, and have been doing more with code-behinds.  But, I'm curious as to when/why I should use a reader, versus a databable, table adaptor to "manage" the data returned from a stored procedure.  Typically, the data is to be displayed on a webpage, and not written back to the database.  What's the difference?  When should I use one over another?  

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend