Dirty Read With DataSource Control

Nov 19, 2007

Hi all,

Can anyone tell me how I can do a "Dirty Read" on a SqlDataSource Control? I'm affraid that the record locks are causing problems on the live system.

It is connected to an infromix db using odbc. Thanks. 

View 1 Replies


ADVERTISEMENT

Set READ UNCOMMITTED (dirty Read) At Login.

Jul 23, 2005

Is it possible to set READ UNCOMMITTED to a user connecting to an SQL2000 server instance? I understand this can be done via a front endapplication. But what I am looking to do is to assign this to aspecific user when they login to the server via any entry application.Can this be set with a trigger?

View 1 Replies View Related

Dirty Read

Jun 10, 1999

Can someone tell me what a dirty read is?

View 1 Replies View Related

Can't Access The Datasource Control

May 21, 2006

When I put a sqldatasource in my page and want to configure it and add a new connection to it I recieve this error : "object reference not set to an instance of an object" . Do you have any idea about solving this problem. please help me Thanks

View 5 Replies View Related

Help Assigning A Datasource To The Gmap Control In C#

Sep 18, 2007

I'm trying to assign a datasource to a gmap control in 2.0 so that i can get pushpins in the map for all the locations in the sql db. I've enclosed my code below as well as a link to the site that provides the control and their sample. Can anyone tell me why it won't show the pins? What am I doing wrong?
Thanks.
 My Code (sqllocations is a datasource):
GMap1.DataSource = sqllocations;
GMap1.DataBind();
Their site: http://en.googlemaps.subgurim.net/ejemplos/ejemplo_991000_DataSource.aspx
Their example (part of their explanation is not english, sorry):
 List<DataSourceField> fields = new List<DataSourceField>(); fields.Add(new DataSourceField(45, 2, "hola"));fields.Add(new DataSourceField(46, 3));// Lo comentamos porque al utilizar la clase DataSourceField, // pero si fuera un dataset o cualquier otra cosa, // le deberíamos dar los nombres correspondientes// GMap1.DataLatField = "lat";// GMap1.DataLngField = "lng";// GMap1.DataGInfoWindowTextField = "gInfoWindowText";GMap1.DataSource = fields;GMap1.DataBind();  
 

View 1 Replies View Related

Error Trapping Of Datasource Control

Oct 1, 2007

Hello,
I encountered an interesting situation. I have a gridview and a sqldatasource. It has delete function. When I delete a record an error of foreign key violation is raised. I would like to trap this error and give a user friendly message to the user.
If I use ADO.Net I can use Try/Catch, but it seems there is no way to do the same thing using datasource. Anyone knows?
Thank you,
J

View 6 Replies View Related

How To Check DataSource Control For Values

Jan 18, 2008

Hey all,
 I was wondering what the best method of checking on page_load if a datasource control is pulling back nothing from a database.  I want to display a message explaining that there is no data to be displayed.  How would I go about doing that?  I have tried searching google and whatnot but didn't find anything really helpful.
Here is the current code for the data source control.
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|EventInsider.mdf;Integrated Security=True;User Instance=True"
ProviderName="System.Data.SqlClient" SelectCommand="SELECT Events_Groups.GroupName, Events_Groups.GroupID FROM Events_GroupMembership INNER JOIN Events_Groups ON Events_GroupMembership.GroupID = Events_Groups.GroupID WHERE (Events_GroupMembership.UserID = @UserID)">
<SelectParameters>
<asp:SessionParameter Name="UserID" SessionField="UserID" />
</SelectParameters>
</asp:SqlDataSource>
 But I have no idea what the code behind would be to check it on page_load.  If there is no way to particularly do this, do you have to do it per control?  Like dropdownbox's or gridviews?  I am just confused on how to check to make sure there is data to be displayed.
Thanks,
Chris

View 3 Replies View Related

Does Anybody Know Where I Can Learn How To Add, Update, Delete Using SQL Datasource Control?

Mar 24, 2008

does anybody know where I can learn how to add, update, delete using SQL datasource control?  I have a couple of books that shows me how to SELECT but nothing shows me how to update, add new record or delete with the SQL data source control. Even this website doesn't have any tutorial. Does any body know where I can read up on how to use all features of this control? Or where that have a couple of examples on how to use it? 

View 5 Replies View Related

How Come I Can Connect To A Database Through A Datasource Control, But Not Code?

Apr 11, 2006

Hi I am trying to open a database connection to a Northwind database.  I can open it with a datasource control and return data to a gridview, but can't programically.  I get a sqlexception error.  this is ust for learning.
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click        Dim S As New SqlConnection        Dim builder As New SqlConnectionStringBuilder        builder("Data Source") = ".SQLEXPRESS;AttachDbFilename=C:SQLNORTHWND.MDF"        builder("Integrated Security") = True        builder("Connect Timeout") = 30        builder("User Instance") = True        S.ConnectionString = builder.ConnectionString        Me.Label1.Text = S.ConnectionString        S.Open()        Me.Label2.Text = S.State.ToString        S.Close()        Me.Label3.Text = Me.SqlDataSource1.ConnectionString.ToString    End Sub
 The text in label2 and Label three are identical except there are "" around the datasource.
How come I can connect through the datasource control but not through code?

View 6 Replies View Related

Read Datasource Value, Send To Textbox In VB Script

Apr 23, 2007

I want to read a value from a datasource and send it to a textbox on an ASP page from the page's attached VB file. 
Both the textbox and datasource exist, but I don't know the proper commands to get the datasource value and then set the textbox value to it.
 
Dim Text As TextBox = FormView0.FindControl("Header")
Dim SQL As String = "Select [Customer] From [Datasource]"
Datasource.SelectCommand = SQL
 
Oh yeah, I don't want the textbox control to be databound as shown: 
Text='<%# Eval("Customer") %>'

View 1 Replies View Related

SqlDataSource Insert, Update Delete Options Are Dimmed In Configure DataSource Control

Mar 23, 2008

I can select the tables and fields, but when I click on Advanced the Check Box to Create the Commands is not available. they are dimmed out.
Why is this happening, is it a setting that I have missed. Any help is appreciated.

View 1 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

Dirty Reads

Aug 1, 2001

If I'm doing a dirty reads and a someone updates a record when I'm trying to read it is it possible to read both the old and new records thereby retrieving two records?

View 2 Replies View Related

Down And Dirty Database Infrastructure

Mar 29, 2006

Does any have a link, or know of an MS book(s) that details theunderlying database structure, tables, processes? Something thatexplains in detail how/why this stuff is configured and works, likeDDL, TDS, varchar, int, index, tables, normalization, DML, PrimaryKey/Foreign key.

View 4 Replies View Related

Keeping Dirty Data

Jan 24, 2008

This may be more of a data design question and not an ssis question, but figured folks here could have a good idea.....the organization I'm in has the business need of collecting data from outside organizations and tracking what data is bad and what data is good. When I say bad data I mean everything from things outside of range to absolute *** - characters in integer columns, integers in character columns, special characters, etc. The data comes in in the form of flat file so it's a free for all until it hits ssis & the db engine.

Eventually of course they work to get the data corrected at the source & resubmitted but in the meantime, they have the legitimate need of not only pushing the data into the database (dirty or not), but keeping all the bad stuff. I can't in good conscience make everything a varchar to catch everything - that would go against the database gods. IMO - I still must make an integer be an integer , characters are characters, etc. But what do I do with the junk? Any thoughts?

View 4 Replies View Related

BULK INSERT && DIRTY BUFFERS

Aug 26, 2005

Hi all

Using SQL 2000 MSDE

I'm bulk inserting about 3.200.000 records into a table

unfortunately all memory dissapears and never returns the dirty buffers count goes up to 48000 approx.

any ideas on how to rectify this ..... ?

View 2 Replies View Related

Checking For Dirty Reads/writes

Apr 17, 2008



Problem Statement........


Lets say user A accesses a record and is making an update to a column... next user B accesses the same record and makes an update to the same column and saves the data... how can user A check to see if an update has been made to prevent overwriting the data..

Is there a query statement that user A can write to check for this?

I understand locking can be used to prevent this but is there an alternative to locking.

View 5 Replies View Related

Can REPLICATION On SQL Server 2000 Allow Dirty Reads

Dec 1, 2005

All my queries are being blocked while the tables are being replicatedand it is causing some 2 minute blocking. Is there a way for theReplication to allow dirty reads because I really don't care aboutthat, I would rather have dirty reads than 2 minute waits.Thanks.

View 1 Replies View Related

SQL Server 2005 SP2 'dirty' Install Results In SSIS Failure

Feb 28, 2007

Hi all,

Hope this helps someone. My experience is that an interrupted install of SP2 screws things royally, despite signifying success.

My initial attempt at installing SQL Server 2005 SP2 (64-bit) on our dev server resulted in massive corruption of at least one SSIS solution. Without the option to uninstall the SP2, the prospect of a complete reinstall/recovery totally ruined my day.

When I loaded the SSIS solution, all packages returned the following connection based errors "connection manager will not acquire a connection because the package OffLineMode property is TRUE". OffLineMode property was in fact set to the default "False" for all packages. Individual tasks were broken also. I did not search all packages, but FTP and File System tasks were all corrupted. Nor could I successfully create these tasks in a new packages, even within a new solution.

During the install I recived the following error:
Error Log:
Product : Database Services (MSSQLSERVER)
Product Version (Previous): 2153
Product Version (Final) :
Status : Failure
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixSQL9_Hotfix_KB921896_sqlrun_sql.msp.log
Error Number : 29506
Error Description : MSP Error: 29506 SQL Server Setup failed to modify security permissions on file D:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData for user xxxxx. To proceed, verify that the account and domain running SQL Server Setup exist, that the account running SQL Server Setup has administrator privileges, and that exists on the destination drive.

The SP2 install continued and with the exception of database Services, all other components were installed successfully.

A very helpful person had posted this solution:

The problem is that there exists a file in this Data directory that the user running SP1 does not have permissions to modify. The workaround is to figure out which file this is (typically a user created DB or some backup program files) and to temporarily assign permission to that file(s). You can revert back to the intended permissions after running SP1.

Sure enough, there was a data and a log file with permission restricted to a single user. Granting permission to the account doing the install worked.

I ran the SP2 again and the database Services component "succeeded". In fact, as outlined, my SSIS packages were unusable.

I re-ran the SP2 install. No components were selected for update, so I manually rechecked each component and executed. This time the install completed successfully for all components, and much to my relief, SSIS functionality was restored.

Pretty scrappy install package IMHO. There are obviously dependencies between the different components being updated, but if these dependencies, and therefore integrity of the update, are broken, the installer nevertheless reports success.

Cheers, Jeremy







View 8 Replies View Related

Issue With SSRS Report Exporting To Excel With The Matrix Control Inside The Table Control

Jan 27, 2008

Hi All,
I am placing a Matrix inside the table control for grouping requirements,but when we export the report to the Excel, the contents inside the table cell are ignored. Is there any way to get the full report exported, as per the Requirement.Please help me with this issue.

With Thanks
M.Mahendra

View 5 Replies View Related

Is It Possible To Embbed And Ocx Control On A Report Or Some Sort Of Interactive Control Like A Flash.ocx?

Oct 25, 2007

does any one have and example of how to embedd a flash swf file onto a report.??? Is it possable? any examples would be helpful.

View 1 Replies View Related

Transact SQL :: Making Server Database Read / Write From Read Only

Jan 12, 2012

i attached adventure works in sql server 2008 and it showing as read only ,make it read write or remove read only tag from database.

View 11 Replies View Related

SQL 2012 :: Identify Whether Files Are In Read / Write Or Read Only

Mar 24, 2015

How to identify whether the files are in read write or read only?

View 1 Replies View Related

Recovery :: Switch (Standby / Read-Only) DB To Be Read And Write

Aug 26, 2015

I'm trying to do Sharepoint DR with Log Shipping and every thing configured except one thing which is switch the WSS_Content (Standby /Read-Only) DB to be ready and Write. 

I tried from

GUI or ALTER DATABASE [WSS_Content] SET
READ_WRITE WITH NO_WAIT

but I received the below error: 

Database WSS_Content is in Warm Standby 

View 9 Replies View Related

Reset Database Files From Read-only To Read-write

Jan 18, 2008

I have two database files, one .mdf and one .ndf. The creator of these files has marked them readonly. I want to "attach" these files to a new database, but cannot do so because they are read-only. I get this message:

Server: Msg 3415, Level 16, State 2, Line 1
Database 'TestSprintLD2' is read-only or has read-only files and must be made writable before it can be upgraded.

What command(s) are needed to make these files read_write?

thanks

View 7 Replies View Related

Read Text File From SQL Server, Read Its Content, And Load It In RichTextBox (Related Component: Context.Response.BinaryWrite(), And StreamReader)

Nov 26, 2007

OBJECTIVE: I would like to read a text file from SQL Server 2000, read the text file content, and load its conntents in a RichTextBoxTHINGS I'VE DONE AND HAVE WORKING:1) I've successfully load a text file (ex: textFile.txt) in sql server database table column (with datatype Image) 2) I've also able to load the file using a Handler as below: using System;using System.Web;using System.Data.SqlClient;public class HandlerImage : IHttpHandler {string connectionString;public void ProcessRequest (HttpContext context) {connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["NWS_ScheduleSQL2000"].ConnectionString;int ImageID = Convert.ToInt32(context.Request.QueryString["id"]);SqlConnection myConnection = new SqlConnection(connectionString);string Command = "SELECT [Image], Image_Type FROM Images WHERE Image_Id=@Image_Id";SqlCommand cmd = new SqlCommand(Command, myConnection);cmd.Parameters.Add("@Image_Id", System.Data.SqlDbType.Int).Value = ImageID;SqlDataReader dr;myConnection.Open(); cmd.Prepare(); dr = cmd.ExecuteReader();if (dr.Read()){ //WRITE IMAGE TO THE BROWSERcontext.Response.ContentType = dr["Image_Type"].ToString();context.Response.BinaryWrite((byte[])dr["Image"]);}myConnection.Close();}public bool IsReusable {get {return false;}}}'>'>
<a href='<%# "HandlerDocument.ashx?id=" + Eval("Doc_ID") %>'>File
</a>- Click on this link, I'll be able to download or view the file WHAT I WANT TO DO, BUT HAVE PROBLEM:- I would like to be able to read CONTENT of this file and load it in a string as belowStreamReader SR = new StreamReader()SR = File.Open("File.txt");String contentText = SR.Readline();txtBox.text = contentText;BUT THIS ONLY WORK FOR files in the server.I would like to be able to read FILE CONTENTS from SQL Server.PLEASE HELP. I really appreciate it.

View 1 Replies View Related

Reporting Services From WebBrowser Control - Print = Unable To Load Client Print Control

Mar 20, 2007

UPDATE #2: When it said "Do you want to install Microsoft SQL Server" I said "yes" and that caused it to work. I exited and re-ran and now the print runs w/o the "install SQL Server" (If the prompt had said "Do you want to install the print dialog" we wouldn't be having this discussion...) 





UPDATE: After posting this i discovered that the same thing occurs when attempting to print the report direct from IE6: First a dialog pops up "Do you want to install this software?" Name: Microsoft SQL Server. When I click "Don't Install" I get the dialog "unable to load client print control." Since this happens direct from IE6 I suspect it's browser settings. I'll resume tomorrow and post a followup.







My WinForm C# app integrates Reporting Services by calling them from WebBrowser controls. The problem is attempts to print cause a dialog: "unable to load client print control."

I've read prior posts that say "enable Active-X in your browser" - I don't know how to do that from a WebBrowser control.



Any ideas how to support Reporting Services "Print" from within a WebBrowser control?

RELATED THREADS

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=332145&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=264478&SiteID=1

 

 

View 1 Replies View Related

SQL 2012 :: Read Committed For Read Only Database?

Jun 27, 2014

i have a database which get refreshed every day from client's data . and we need to pull heavy data from them every day as reports . so only selects happens on that database.

we do daily population of some table in some other databases from this daily refreshed DB.

will read uncommitted or NOLOCK with select queries to retrieve data faster.

there will be no dirty read as there are NO DML operation in that database so for SELECT which happens concurrently on these tables , will NOLOCK work?

View 2 Replies View Related

SQL 2012 :: Change Read-only And Read-write

Aug 15, 2014

Can a user of db owner role of a database change the databse option to read only and read-write?If not what permission I need to grant to the user?

View 1 Replies View Related

Come On SQLdatareader....read....read....read...ok Help.

Mar 12, 2004

OK, I'm using VS2003 and I'm having trouble. The page works perfectly when I created it with WebMatrix but I want to learn more about creating code behind pages and this page doesn't work. I think it has some things to do with Query builder but I can't seem to get change outside "please register". I have the table populated and it is not coming back with "login successful" or "password wrong" when I've entered correct information. Enclosed is what I've done in VS2003. Can you see where my error is? Any help would be greatly appreciated.
Thanks again.

Imports System.data.sqlclient
Imports System.Data
Public Class login2
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.SqlConnection1 = New System.Data.SqlClient.SqlConnection
Me.SqlCommand1 = New System.Data.SqlClient.SqlCommand
'
'SqlConnection1
'
Me.SqlConnection1.ConnectionString = "server=LAWORKSTATION;user id=sa;database=test;password=t3st"
'
'SqlCommand1
'
Me.SqlCommand1.CommandText = "SELECT pass FROM Customer WHERE (email = 'txtusername.text')"
Me.SqlCommand1.Connection = Me.SqlConnection1

End Sub
Protected WithEvents lblUsername As System.Web.UI.WebControls.Label
Protected WithEvents lblPassword As System.Web.UI.WebControls.Label
Protected WithEvents txtUsername As System.Web.UI.WebControls.TextBox
Protected WithEvents txtPassword As System.Web.UI.WebControls.TextBox
Protected WithEvents btnSubmit As System.Web.UI.WebControls.Button
Protected WithEvents lblMessage As System.Web.UI.WebControls.Label
Protected WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection
Protected WithEvents SqlCommand1 As System.Data.SqlClient.SqlCommand

'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub

Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
SqlConnection1.Open()
Dim dr As SqlDataReader = SqlCommand1.ExecuteReader
If dr.Read() Then
If dr("password").ToString = txtPassword.Text Then
lblMessage.Text = "login successful"
Else
lblMessage.Text = "Wrong password"
End If
Else
lblMessage.Text = "Please register"
End If
dr.Close()
SqlConnection1.Close()
End Sub
End Class

View 8 Replies View Related

SQL DataSource

Mar 28, 2007

I working on a form using an SQL DataSource. I am going to add a where clause. In that where clause a value from a label will be passed from the user.
How do I pass to the HTML Source the label value from the where clause. The value can change from user to user.
Sample below:
SELECT [KeyRolesID], [KeyRolesDesc] FROM [KeyRoles] WHERE ([JobCodeFamily] = @JobCodeFamily).
I want to replace the @JobCodeFamily which is currently coded with a value from the Sql DataSource in the design form with a label value entered by the user.

View 2 Replies View Related

Wcf For Xml Datasource

Aug 28, 2006

Hi, guys

I used an exported wcf service as a web service, try to use it as the reporting datasource,

[OperationContract]

DataSet GetTestReportData();

the app.config in the service host:

<configuration>

<appSettings>

<add key="BaseReportingAddress" value="http://localhost:8999/ReportHandlerService"/>

</appSettings>

<system.serviceModel>

<services>

<service name="Reporting_Handler.ReportHandlerService">

<endpoint address="http://localhost:8999/ReportHandlerService"

binding="basicHttpBinding"

behaviorConfiguration="ReportingServiceBehavior"

contract="Reporting_Handler.IReportingHandler"/>

</service>

</services>



<behaviors>

<behavior name="ReportingServiceBehavior">

<metadataPublishing

enableGetWsdl="true"

enableMetadataExchange="true"

enableHelpPage="false">

</metadataPublishing>

</behavior>

</behaviors>

I set the datasource type as xml and the connection string to http://localhost:8999/ReportHandlerService, the query string for dataset is

<Query>
<SoapAction>
http://tempuri.org/IReportingHandler/GetTestString
</SoapAction>
<Method Namespace="http://tempuri.org/IReportingHandler/"
Name="GetTestString">
</Method>
</Query>

but it doesn't work, I tried use a pure asp.net web service and it works. can anyone help me to set the connecting string for datasource and query for dataset when it using wcf as the web service? Thanks in advance.



bruce



View 2 Replies View Related

What Is A Datasource Used For?

Mar 18, 2008

Hi All,

I have a question about the datasource that we create on the Report Manager. What is it used for? In the below connection string which is given in the "Connection String" text box of a datasource link:

"Data Source=ProdServer;Initial Catalog=Northwind"

What is this datasource used for? Is it used only to use the ReportServer database or even our queries incorporated in the RDL files will be run against this datasource? I think the latter should not happen because while creating RDL files also, we provide a connection string to run the stored procedures against that datasource.

Please let me know about the same.

Thanks a lot and let me know if the question is not clear.

Manoj Deshpande.


View 11 Replies View Related







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