Attempt To Execute SLQ Not Working

Nov 13, 2007

I am hosting my website with a web hosting company on the web. My web application reads
data from a SQL server 2005 database. So far I have been able to establish a connection
to the database, but when I attempt to query data from a table, I a get an error message.
I can't figure out what I am doing wrong here.basically I just want to read data from a
column in the database and to store it into a multi-line textbox control. I am using some
inline sql for the call. Can someone help me out here?

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)  {   }
    protected void Button1_Click(object sender, EventArgs e)
    {
      mySqlConnection = new SqlConnection(ConnectionStringConst);
      mySqlConnection.Open();
      try
      {
      // Database is named "Torsion", Table I am querying is named "Content"
       SqlCommand cmd = new SqlCommand("SELECT * FROM [Torsion].[dbo].[Content] ORDER BY [Section] DESC", mySqlConnection);
       rdr = cmd.ExecuteReader();
       ListBox1.DataSource = rdr[0];
       ListBox1.DataTextField = "HLContent"; // HLContent is the first column in my database
       ListBox1.DataBind();        // I want to store HLContent into ListBox1 control
      }
    catch  { throw;}
    finally
    {   mySqlConnection.Close();
        mySqlConnection.Dispose();
    }
    }
}
-----------------------------------------ERROR_MESSAGE_BELOW----------------------------


Server Error in '/' Application.


Invalid attempt to read when no data is present.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Invalid attempt to read when no data is present.

Source Error:





An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:





[InvalidOperationException: Invalid attempt to read when no data is present.]
System.Data.SqlClient.SqlDataReader.GetValue(Int32 i) +137
System.Data.SqlClient.SqlDataReader.get_Item(Int32 i) +7
_Default.Button1_Click(Object sender, EventArgs e) +167
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102





Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832

View 3 Replies


ADVERTISEMENT

Command Or Execute Not Working

Mar 11, 2007

Can anybody help me with this command code that stops at the execute and eventually gives timeout.


Dim MM_Cmd, strSQL, strSQL2, strSQL3, strSQL4

Set MM_Cmd = Server.CreateObject("ADODB.Command")
MM_Cmd.ActiveConnection = MM_connAdmin_STRING
strSQL = "update Products_Categories set Depth=NULL, Lineage=''"
MM_Cmd.CommandText = strSQL
MM_Cmd.CommandType = 1
'MM_Cmd.CommandTimeout = 0
MM_Cmd.Prepared = True
MM_Cmd.Execute strSQL
Set MM_Cmd = Nothing

Regards
Amazing

View 2 Replies View Related

Execute As &&<Privileged User&&> Not Working

May 13, 2008

Hi all,
I want some low privileged users to get access to some systems Stored procedure and other resources.What is wrong with the below code ?



--Login as 'domainadministrator', a privileged user




Code Snippet

Create Proc ExecCmd(@cmd nVarchar(4000)) with execute as 'domainadministrator'

AS

Begin

EXECUTE (@cmd)

End
Command(s) completed successfully.

GRANT IMPERSONATE ON USER::[domainadministrator] to appusers
Command(s) completed successfully.

Grant execute on ExecCmd to appusers
Command(s) completed successfully.







But When I login as appusers, and run the procedure I am getting this error




Code Snippet
ExecCmd 'xp_cmdshell ''DIR C'''

The EXECUTE permission was denied on the object 'xp_cmdshell', database 'mssqlsystemresource', schema 'sys'








Thanks in advance,
Sanoj

View 1 Replies View Related

Calling Oracle Procedure From SSIS 'Execute SQl Task' Is Not Working

Nov 6, 2007

Hi ,


Iam using 'Execute SQl task' which calls a stored procedure located in sql server database.The task's SQL source type is variable and the variable has the follwoing expression "EXEC PROC_SEL_MBO_REPORT "+@[User::V_SP_Job_Date]after evaluation it is like EXEC PROC_SEL_MBO_REPORT '01/NOV/2007'.It is working fine

Now the procedure is changed to Oracle.So I have changed it to "BEGIN PROC_SEL_MBO_REPORT " + "("+ @[User::V_SP_Job_Date]+")"+"; END"+";" after evaluation it is like BEGIN PROC_SEL_MBO_REPORT ('01/NOV/2007') END;.It is sucessfully executing from the task but no data is loaded into the tables which are used by the procedure internally.
Executing 'execute BEGIN PROC_SEL_MBO_REPORT ('01/NOV/2007') END;' is perfectly alright from SQl developer or sql plus.

Please help me.. thanks in advance

Regards,
GK

View 5 Replies View Related

My First Attempt At Sql Server 2005 And Asp.net V2.0

Mar 7, 2006

Hello,The code below is my first attempt at sql server 2005 and asp.net v2.0. Can anyone let me know what they think of it, ie things that are bad and should be changed?thanks.csusing System;using System.Data;using System.Data.SqlClient;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Web.Configuration;using System.Net.Mail;public partial class register : System.Web.UI.Page{    protected void Page_Load(object sender, EventArgs e)    {        if (Session["ID"] == null)        {            //notlogged in            uxRegisterPanel.Visible = true;            uxSuccessPanel.Visible = false;            uxExistPanel.Visible = false;        }        else        {            //logged in            uxRegisterPanel.Visible = false;            uxSuccessPanel.Visible = false;            uxExistPanel.Visible = true;        }    }    protected void submit_Click(object sender, EventArgs e)    {        int anyerror = 0;        int receiveUpdate = 0;        if (uxNameText.Text.Length < 3)        {            uxNameLabel.Text = "*Must be 3 or more characters long";            anyerror = 1;        }        else        {            uxNameLabel.Text = "";        }        if (uxPassText.Text.Length < 6)        {            uxPasswordLabel.Text = "*Must be at least 6 characters";            anyerror = 1;        }        else        {            uxPasswordLabel.Text = "";        }        if (uxUpdateCheck.Checked)        {            receiveUpdate = 1;        }        if (anyerror == 0)            //all fine submit to db to check that username/email does not exist        {            //new connection            string connectionString = WebConfigurationManager.ConnectionStrings["Pubs"].ConnectionString;            SqlConnection myConnection = new SqlConnection(connectionString);            try            {                myConnection.Open();                SqlCommand memberCheck = new SqlCommand("memberCheck", myConnection);                memberCheck.CommandType = CommandType.StoredProcedure;                memberCheck.Parameters.Add("@name", SqlDbType.VarChar);                memberCheck.Parameters["@name"].Value = uxNameText.Text;                SqlDataReader memberCheckReader;                memberCheckReader = memberCheck.ExecuteReader();                if (memberCheckReader.HasRows)                {                    //if username exists                    uxNameLabel.Text = "<br />" + uxNameText.Text + " already exists, choose another or if this is you <a href='/sendPassword.aspx'>send your password</a>.";                    anyerror = 1;                }                else                {                    uxNameLabel.Text = "";                }                memberCheckReader.Close();                SqlCommand memberECheck = new SqlCommand("memberECheck", myConnection);                memberECheck.CommandType = CommandType.StoredProcedure;                memberECheck.Parameters.Add("@email", SqlDbType.VarChar);                memberECheck.Parameters["@email"].Value = uxEmailText.Text;                SqlDataReader memberECheckReader;                memberECheckReader = memberECheck.ExecuteReader();                if (memberECheckReader.HasRows)                {                    //if email exists                    uxEmailLabel.Text = "<br />" + uxEmailText.Text + " already exists, have you <a href='/sendPassword.aspx'>forgoten your password</a>?";                    anyerror = 1;                }                else                {                    uxEmailLabel.Text = "";                }                memberECheckReader.Close();                if (anyerror == 0)                {                    //insert member details                    SqlCommand memberInsert = new SqlCommand("memberInsert", myConnection);                    memberInsert.CommandType = CommandType.StoredProcedure;                    memberInsert.Parameters.Add("@name", SqlDbType.VarChar);                    memberInsert.Parameters["@name"].Value = uxNameText.Text;                    memberInsert.Parameters.Add("@email", SqlDbType.VarChar);                    memberInsert.Parameters["@email"].Value = uxEmailText.Text;                    memberInsert.Parameters.Add("@password", SqlDbType.VarChar);                    memberInsert.Parameters["@password"].Value = uxPassText.Text;                    memberInsert.Parameters.Add("@receiveUpdate", SqlDbType.SmallInt);                    memberInsert.Parameters["@receiveUpdate"].Value = receiveUpdate;                    SqlDataReader memberInsertReader;                    memberInsertReader = memberInsert.ExecuteReader();                    memberInsertReader.Read();                    //store session stuff                    Session["Name"] = uxNameText.Text;                    Session["ID"] = memberInsertReader["ident"].ToString();                    Session["Access"] = 0;                    //send activation email                    MailMessage email = new MailMessage("noreply@name.com", uxEmailText.Text);                    email.Subject = "Action needed to activate your account at cookbuzz.com";                    email.Body = "Please follow the link below to activate your account" + memberInsertReader["ident"].ToString();                    SmtpClient mailClient = new SmtpClient();                    mailClient.Host="smtp.ntlworld.com";                    mailClient.Send(email);                    memberInsertReader.Close();                    uxRegisterPanel.Visible = false;                    uxSuccessPanel.Visible = true;                    uxSentTo.Text = uxEmailText.Text;                }                            }            catch (Exception err)            {                Response.Write("Error:" + err);            }            finally            {                myConnection.Close();            }        }    }}.aspx<%@ Page Language="C#" AutoEventWireup="true" CodeFile="register.aspx.cs" Inherits="register" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server">    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />    <title>Cook Buzz ::</title></head><body>    <form id="form1" runat="server">            <h1>Register</h1>         <asp:Panel ID="uxRegisterPanel" runat="server">    <table>    <tr>    <td>User name: </td>    <td><asp:TextBox ID="uxNameText" runat="server" MaxLength="50"></asp:TextBox>&nbsp;<asp:RequiredFieldValidator            ID="RequiredFieldValidator2" runat="server" ControlToValidate="uxNameText" CssClass="error"            Display="Dynamic" ErrorMessage="*Input a username"></asp:RequiredFieldValidator>        <asp:Label ID="uxNameLabel" runat="server" CssClass="error"></asp:Label></td>    </tr>    <tr><td colspan="2"><div class="small">An activation code will be sent to the address below</div></td></tr>    <tr>    <td>Email address: </td>    <td><asp:TextBox ID="uxEmailText" runat="server" MaxLength="100"></asp:TextBox>        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="uxEmailText"            ErrorMessage="*Invalid email" ValidationExpression="w+([-+.']w+)*@w+([-.]w+)*.w+([-.]w+)*" CssClass="error" Display="Dynamic"></asp:RegularExpressionValidator><asp:RequiredFieldValidator                ID="RequiredFieldValidator3" runat="server" ControlToValidate="uxEmailText" CssClass="error"                Display="Dynamic" ErrorMessage="*Input an email"></asp:RequiredFieldValidator>        <asp:Label ID="uxEmailLabel" runat="server" CssClass="error"></asp:Label></td>    </tr>    <tr>    <td>Confirm Email: </td>    <td><asp:TextBox ID="uxCEmailText" runat="server" MaxLength="100"></asp:TextBox>        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="uxCEmailText"            CssClass="error" Display="Dynamic" ErrorMessage="*Input an email"></asp:RequiredFieldValidator>        <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="uxEmailText"            ControlToValidate="uxCEmailText" ErrorMessage="*Emails dont match" CssClass="error"></asp:CompareValidator></td>    </tr>        <tr><td colspan="2"><div class="small">Passwords must be 6 or more characters in length</div></td></tr>    <tr>    <td>Password:</td>    <td><asp:TextBox ID="uxPassText" runat="server" TextMode="Password" MaxLength="50"></asp:TextBox>        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="uxPassText"            CssClass="error" Display="Dynamic" ErrorMessage="*Input a password"></asp:RequiredFieldValidator>        <asp:Label ID="uxPasswordLabel" runat="server" CssClass="error"></asp:Label></td>    </tr>    <tr>    <td>Confirm Password: </td>    <td><asp:TextBox ID="uxCPassText" runat="server" TextMode="Password" MaxLength="50"></asp:TextBox>        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="uxCPassText"            CssClass="error" Display="Dynamic" ErrorMessage="*Input a password"></asp:RequiredFieldValidator>        <asp:CompareValidator ID="CompareValidator2" runat="server" ControlToCompare="uxPassText"            ControlToValidate="uxCPassText" CssClass="error" ErrorMessage="*Passwords dont match" Type="String" ValueToCompare="Text"></asp:CompareValidator></td>    </tr>    <tr><td></td><td>        <asp:CheckBox ID="uxUpdateCheck" runat="server" Checked="True" Text="Receive email updates" /></td></tr>    <tr>    <td></td>    <td>        <br />        <asp:Button ID="submit" runat="server" Text="Register" OnClick="submit_Click" /><br />        <div class="small">By clicking register you argree to the <a href="terms.aspx">Terms &amp; Conditions</a>.<br />        We take privacy seriously, please read our <a href="privacy.aspx">Privacy Policy</a>.</div></td>    </tr>    </table>        </asp:Panel>        <asp:Panel ID="uxExistPanel" runat="server">            You are already registered and logged in.<br />            <br />            If you are waiting for an email to activate your account then you can <a href="resendactivation.aspx">                resend activation email</a>.</asp:Panel>        <br />        <asp:Panel ID="uxSuccessPanel" runat="server">            You are now registered and logged in.<br />            <br />            Before you can begin to use your account you need to click the activation link sent            to            <asp:Label ID="uxSentTo" runat="server"></asp:Label>. Please be aware that it may            be delivered to junk mail folders.<br />            <br />            If you do not receive an activation email you can <a href="#">resend the activation                email</a> or <a href="#">change your email address</a>.</asp:Panel>            </form></body></html>stored procsset ANSI_NULLS ONset QUOTED_IDENTIFIER ONgoALTER PROCEDURE [dbo].[memberInsert]    @name varchar(50),    @password varchar(50),    @email varchar(100),    @receiveUpdate smallintAS    BEGIN    SET NOCOUNT ON;    Insert into    Member(Name,Password,Email,JoinDate,LastActivity,groupID,receiveUpdate)    Values(@name,@password,@email,getdate(),getdate(),0,@receiveUpdate)    DECLARE @code varchar(4)    SET @code = round(rand()*8999,0)+1000    select @@identity as ident, @code as code        INSERT into    activation(memberID,code)    values(@@identity,@code)set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgoALTER PROCEDURE [dbo].[memberCheck]    (    @name varchar(50)    )ASBEGIN    /* SET NOCOUNT ON */ --check to see if username is in use--SELECT name from Member where Name = @nameENDRETURN

View 4 Replies View Related

Your Login Attempt Was Not Successful. Please Try Again

Dec 3, 2006

I have a standard Login ASP.NET 2.0 control on a login Page, a LoginName and LoginStatus controls on the member's page.
once the user login successfully I am redirecting the user to Member.aspx page. The following is my machine configuration

Windows XP Pro Service Pack2
IIS 5.1
SQL Server 2000
visual Studio 2005
DISABLE ANONMYOUS ACCESS IN IIS
ENABLE WINDOWS AUTHENTICATION

I am Using form authentication, and I am getting following error "Your login attempt was not successful. Please try again".

To debug,I am displaying the follwoing properties

Membership.ValidateUser(Login1.UserName, Login1.Password) : - True
HttpContext.Current.User.Identity.Name : - // is blank
FormsAuthentication.FormsCookieName : - SqlAuthCookie
FormsAuthentication.CookieDomain :- // is blank
FormsAuthentication.CookieMode :- UseCookies
FormsAuthentication.CookiesSupported :- True
FormsAuthentication.DefaultUrl :- /webIT/default.aspx
FormsAuthentication.EnableCrossAppRedirects :- False
FormsAuthentication.FormsCookieName :- SqlAuthCookie
FormsAuthentication.FormsCookiePath :- /
FormsAuthentication.LoginUrl :- /webIT/ASPX/Security/Login.aspx
FormsAuthentication.RequireSSL :- False
FormsAuthentication.SlidingExpiration :- True
User.Identity.IsAuthenticated :- False
User.Identity.Name :- // is blank
User.Identity.AuthenticationType :- // is blank


Is it something to do with the security of Windows XP Pro ? or a IIS 5.1? Any help will be highly appreciated.



Login.aspx file is


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
&nbsp;</div>
<asp:Login ID="Login1" runat="server" DestinationPageUrl="~/Member.aspx" RememberMeSet="True">
</asp:Login>
</form>
</body>
</html>



Member.aspx is

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Member.aspx.cs" Inherits="Member" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
You are back ........
<asp:LoginName ID="LoginName1" runat="server" />
<asp:LoginStatus ID="LoginStatus1" runat="server" LogoutAction="Redirect" LogoutPageUrl="~/Login.aspx" />

</div>
</form>
</body>
</html>


Member.aspx.cs


using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Member : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("<br/>Page.User.Identity.Name: " + Page.User.Identity.Name);
Response.Write("<br/>Page.User.Identity.IsAuthenticated: " + Page.User.Identity.IsAuthenticated);
Response.Write("<br/>Page.User.Identity.AuthenticationType: " + Page.User.Identity.AuthenticationType);

}//end
}



Web.config file is


<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<connectionStrings>
<clear />
<add name="SQL_CONNECTION_STRING"
connectionString="server=Sample;database=sample;user id=sa;password=temp;"
providerName="System.Data.SqlClient"
/>
</connectionStrings>


<system.web>
<authentication mode="Forms">
<forms name="SqlAuthCookie"
loginUrl="~/ASPX/Security/Login.aspx"
timeout="60"
domain=""
path="/"
protection="All"
requireSSL="false"
slidingExpiration="true"
defaultUrl="default.aspx"
cookieless="UseCookies"
enableCrossAppRedirects="false"
/>
</authentication>


<!-- Deny Access to anonymous user -->
<authorization>
<deny users="?" />
<allow users="*"/>
</authorization>



<!-- SQL Server Memebership Provider's-->
<membership defaultProvider="SqlProvider"
userIsOnlineTimeWindow="30">
<providers>
<clear />
<add connectionStringName="SQL_CONNECTION_STRING"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
passwordFormat="Hashed"
applicationName="webIT"
name="SqlProvider"
type="System.Web.Security.SqlMembershipProvider" />
</providers>
</membership>


<!-- SQL Server RoleManager Provider's-->
<roleManager enabled="true"
cacheRolesInCookie="true"
cookieName=".ASPXROLES"
defaultProvider="SqlRoleProvider">
<providers>
<clear />
<add connectionStringName="SQL_CONNECTION_STRING"
applicationName="webIT"
name="SqlRoleProvider"
type="System.Web.Security.SqlRoleProvider" />
</providers>
</roleManager>

</configuration>


NOTE : The applicationName is same in web.config as well as in the aspnet_Applications table in SQL Server 2000 membership database.

View 22 Replies View Related

What If I Attempt To Creat A Publication While...

Apr 29, 2007

What if I attempt to creat a (merge) publication while the production sql server is online and active?



From another point of view, is there any drawback if I try to create (merge) publication while the tables are being used by users?





Thanks

Ekrem Önsoy

View 5 Replies View Related

First Attempt To Connect Fails

May 11, 2007

I have a C# application that connects to a SQL Server Express 2005 instance. One of the testers here shuts his machine down every night and first thing in the morning when he fires up the application it fails to connect. If he tries to open it again right after that it connects. What would the failed attempt do that would fix the instance?

View 6 Replies View Related

SQL Server DB And Stored Procedure - 1st Attempt

Mar 24, 2005

New project and this one going with stored procedures.
Should have done it on my first project, but learn as you go...

I have the following code to insert info into the database....

SqlCommand myCommand = new SqlCommand("sp_AddOnlineUser", myConnection);
myCommand.CommandType = CommandType.StoredProcedure;
myCommand.Parameters.Add("@IP_Address", Request.ServerVariables["REMOTE_ADDR"]);
myCommand.Parameters.Add("@Session_ID", Session.SessionID.ToString());
myCommand.Parameters.Add("@user_Agent", Request.ServerVariables["HTTP_USER_AGENT"]);
myCommand.Parameters.Add("@Referer", Request.ServerVariables["HTTP_REFERER"]);


Now, I just want to be sure this stored procedure is correct and if not, suggestions....

create proc dbo.sp_AddOnlineUser
@IP_Address char(4),
@Session_ID nvarchar(100),
@user_Agent nvarchar(255),
@Referer nvarchar(255)


Thanks all,

Zath

View 4 Replies View Related

1st Attempt, Designing, Would Like Somebody To Review And Critique It

Jan 23, 2001

Hello

This is my 1st attempt at designing a database, and I have not finished
it completely, but I would like somebody to review and critique for me.
I really don't want to make any mistakes with this and I would appreciate any expertise out there to direct, recommend, suggest improvements and/or changes, PLEASE.

Thank you for considering this,,,if you provide me with your e-mail, I can send you a script.

take care,
~Iris~
:)

View 1 Replies View Related

DTS Package Scheduling Attempt Fails

Mar 10, 1999

I have a Local DTS Package which will execute fine...no problems. When I try to schedule it from my NT 4.0 Workstation to the NT 4.0 Server, I get the job scheduling dialog box...fill it out...click OK...and NOTHING.

No error message, nothing in the SQL error log, nothing in the NT logs, no job in the schedule! When I perform the same task at the server logged in as Administrator it schedules successfully.

Any feedback would be greatly appreciated.

Eric

View 2 Replies View Related

Attempt To Fetch Logical Page 605

Aug 1, 2005

Hi all,
I'm not too sure if this should be in this forum or in the admin one, but since DBCC is required to fix this error, so I might as well put it here. What I'm having is this error msg:

Attempt to fetch logical page in database 'DBName' belongs to object 'TableName', not to object 'TableName'.
Error: 605, Severity: 21, Stat: 1

I've checked BOL and it said that DBCC CheckTable on the 2nd table will fix this issue (or by using CheckDB), that is fine but what I want to know is why is this happening, and how to prevent it, I have a cluster server holding this DB, we have disabled write cache and we have tried to fail over to another node, but this issue does happen again (more often now), its running on SQL 2000 with sp4. Anyone got any ideas of why this is happening? and how to prevent it?
Thanks

View 20 Replies View Related

How To Update Data In The Database, My Attempt Was Unsuccessful.

Mar 17, 2007

I was hoping I could get this to work, so far I can access all the data from the database, but I also want to update it. I placed a button, updateBttn_Click event to update the database.It's not updating though and I am not gettting any errors. Could you please look at the update query in the update button and see if I have it right. Also, I think it might be because I have the first retrieval of the database tables set to  ExecuteReader(). Do I need to redo this and use ExecuteNonQuery somewhere else?Thanks in advance. using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Data.SqlClient;public partial class userpage : System.Web.UI.Page{    protected void Page_Load(object sender, EventArgs e)    {        if (!IsPostBack)        {        usrnmeLbl.Text = PreviousPage.CurrentUser;        hiddenpassLbl.Text = PreviousPage.CurrentPass;        //Define database connection        SqlConnection conn = new SqlConnection(            "Server=localhost\SqlExpress;Database=MyDB;" + "Integrated Security=True");        //Create command        //SqlCommand comm = new SqlCommand("SELECT UserName, Password, UserID FROM UsersTable WHERE UserName = '" + usrnmeLbl.Text + "'", conn);        //SqlCommand comm = new SqlCommand("SELECT Father FROM FamHistTable WHERE UserID IN (SELECT UserID, UserName, Password FROM UsersTable WHERE UserName = '" + usrnmeLbl.Text + "')", conn);        //SqlCommand comm = new SqlCommand("SELECT FamHistTable.Father FROM FamHistTable INNER JOIN UsersTable ON FamHistTable.UserID = UsersTable.UserID WHERE UsersTable.UserID = '" + usrnmeLbl.Text + "'", conn);        SqlCommand comm = new SqlCommand("SELECT * FROM FatherHistTable, MotherHistTable, UsersTable WHERE UsersTable.UserName = '" + usrnmeLbl.Text + "'", conn);        //Open connection        conn.Open();        //Execute the command        SqlDataReader reader = comm.ExecuteReader();        //Read and display the data            while (reader.Read())            {                string usr = reader["username"].ToString();                usr = usr.TrimEnd();                string pss = reader["password"].ToString();                pss = pss.TrimEnd();                if (usrnmeLbl.Text == usr)                {                    if (hiddenpassLbl.Text == pss)                    {                        readDB_Lbl.Text += reader["username"] + "<br />";                        //readDB_Lbl.Text += "Your User ID is: " + reader["UserID"] + "<br />";                        readDB_Lbl.Text += "Your Father's name is: " + reader["Father"] + "<br />";                        readDB_Lbl.Text += "Your Mother's name is: " + reader["Mother"] + "<br />";                    }                    else                    {                        readDB_Lbl.Text = "User and Password mismatch.";                    }                }            }                        reader.Close();        conn.Close();    }       }    protected void updateBttn_Click(object sender, EventArgs e)    {        SqlCommand comm = new SqlCommand("UPDATE FatherHistTable SET " + "'famUpdteDDL.SelectedItem.Value'" + "  = " + "'addPrsnTxtBx.Text'" + "WHERE UserName = " + "'usrnmeLbl.Text'");    }}

View 8 Replies View Related

An Attempt To Attach An Auto-named Database

Apr 6, 2008

I try to run a webform with gridview which is using the sqldatasource to get the customer table from local database, AdventureWorks_Data.mdf, it throws the following error:
Error:
An attempt to attach an auto-named database for file C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataAdventureWorks_Data.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
 
 

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

An Attempt To Attach An Auto-named Database

Apr 27, 2008

 I try to display normal gridview in a webform but it throws this error:


An attempt to attach an auto-named database for file C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataCommerce.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
 Line 45:             Dim myAdapter As New SqlDataAdapter(myCommand)Line 46:             myAdapter.Fill(myDataSet)Line 47: Line 48:             gv_CashStatementList.DataSource = myDataSet
Web.Config
<add name="CommerceConnectionString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=&quot;C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataCommerce.mdf&quot;;Integrated Security=True;Connect Timeout=30;User Instance=True"
providerName="System.Data.SqlClient" />

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

Attempt To Start Report Service Failed...

Mar 6, 2008

Hi all,
I'm new to SSRS. I installed reporting services with my other services in SQL Server 2005. When I started Reporting Service Configuration tool,I see that my Reporting Server Status Stopped. When i am trying to start the service, i get the following error(exception)....also attached are the logfiles....

EXCEPTION DETAILS:
System.ServiceProcess.TimeoutException: Time out has expired and the operation has not been completed.
at System.ServiceProcess.ServiceController.WaitForStatus(ServiceControllerStatus desiredStatus, TimeSpan timeout)
at ReportServicesConfigUI.Panels.ServerInformationPanel.StartStopServiceTask(Boolean start)

LOGFILE1:
-----------------------
------------------------------
ReportingServicesService!library!8!3/6/2008-20:26:48:: e ERROR: Sql error:System.Data.SqlClient.SqlException: Could not find stored procedure 'GetDBVersion'.
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.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.ReportingServices.Library.InstrumentedSqlCommand.ExecuteNonQuery()
at Microsoft.ReportingServices.Library.ConnectionManager.EnsureCorrectDBVersion()
ReportingServicesService!library!8!3/6/2008-20:26:48:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InvalidReportServerDatabaseException: The version of the report server database is either in a format that is not valid, or it cannot be read. The found version is 'Unknown'. The expected version is 'C.0.8.40'. To continue, update the version of the report server database and verify access rights., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InvalidReportServerDatabaseException: The version of the report server database is either in a format that is not valid, or it cannot be read. The found version is 'Unknown'. The expected version is 'C.0.8.40'. To continue, update the version of the report server database and verify access rights.
ReportingServicesService!library!8!3/6/2008-20:26:48:: Exception caught while starting service. Error: Microsoft.ReportingServices.Diagnostics.Utilities.InvalidReportServerDatabaseException: The version of the report server database is either in a format that is not valid, or it cannot be read. The found version is 'Unknown'. The expected version is 'C.0.8.40'. To continue, update the version of the report server database and verify access rights.
at Microsoft.ReportingServices.Library.ConnectionManager.EnsureCorrectDBVersion()
at Microsoft.ReportingServices.Library.ConnectionManager.ConnectStorage()
at Microsoft.ReportingServices.Library.ServiceController.ServiceStartThread()
ReportingServicesService!library!8!3/6/2008-20:26:48:: Attempting to start service again...

LOGFILE2:
------------
--------------------
ReportingServicesService!library!4!3/6/2008-20:26:47:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.UnknownUserNameException: The user or group name 'MACHINE_NAMEASPNET' is not recognized., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.UnknownUserNameException: The user or group name 'MACHINE_NAMEASPNET' is not recognized.
ReportingServicesService!servicecontroller!9!3/6/2008-20:26:47:: Total Physical memory: 1063641088
ReportingServicesService!servicecontroller!4!3/6/2008-20:26:47:: e ERROR: Exception caught starting RPC server: Microsoft.ReportingServices.Diagnostics.Utilities.UnknownUserNameException: The user or group name 'MACHINE_NAMEASPNET' is not recognized.
at Microsoft.ReportingServices.Library.Native.NameToSid(String name)
at Microsoft.ReportingServices.Library.ServiceAppDomainController.StartRPCServer(Boolean firstTime)

The IIS Version I'm using is 5.1

View 5 Replies View Related

SQL 2000 Bulk Insert Attempt On FTP In Progress

Dec 7, 2006

Hi All,I think this is a thorny problem, and I'm hoping you can help. I've notfound this exact issue described anywhere yet.I have a stored procedure that calls BULK INSERT on a set of text files.These files are FTP'd from a legacy system (a mainframe running MVS).Sometimes, the process steps on iteslf, whereby the bulk insert is attemptedon a file whose FTP is still in progress; it's not fully written to disk onthe SQL box (it's a 100MB file that takes a long time to cross the networkto the share on the Windows box), and so the insert generates a fatal errorand the procedure stops.I wrote a proc that calls the sp_OA* procs to use theScripting.FileSystemObject to test for the file's readiness. It returns anerror for me if the file does not exist. It also returns an error if I tryto run the BULK INSERT against a file which is being copied via Windows tothe SQL box. This is working just fine under those conditions; thesp_OAMethod to call OpenTextFile bombs appropriately if the file write isstill in progress.That's great, but it doesn't do the same thing during an FTP in progress.It doesn't generate the same error (that is OpenTextFile has no problemopening a partially written FTP'd file). I can also open the file inNotepad, even though it's not fully written to disk ... something I did notexpect, but there we are. What is it about FTP that's different from aWindows file system copy operation that makes the file look available forreading?If BULK INSERT is capable of detecting that it cannot do its thing on a filewhose FTP is in progress, then what can I write or call to emulate thatdetection? I tried writing a COM object in VB.NET and calling that from mySQL stored proc instead of the Scripting Engine's FSO methods. My codesimlpy tries to run a FileOpen using an Exclusive read lock; however, thisdoesn't seem to work, and I'm shooting in the dark now.Can anyone tell me what kind of file i/o request BULK INSERT makes, suchthat it is capable of abending during a run against an incompletely writtenfile using FTP?Thanks!Tim

View 3 Replies View Related

First Attempt At Stored Procedure - Can Anyone Offer Advice

Jul 20, 2005

SQL SERVER 2000Hi allThis is my first attempt at writing a stored procedure. I have managed toget it working but its unlikely to be the best way of handling the problem.While writing it I found some things that I don't understand so if any onecould shed any light it would be much appreciated. I have posted these atthe end.Sorry about the length but I thought it might be worthwhile posting the codeThe purpose of the procedures is as follows : we have a view of lots of bitsof information that need automatically mailing to different people. eachelement of information has a name allocated against it. If we had 100 piecesof data, 50 could go to manager 1 25 could go to manager 2 and 25 to manager3 etc...Both SP's look at the same viewThe first SP generates a distinct list of managers and for each managercalls the second SPThe second SP filters the view for the data belonging to the selectedmanager, and builds an HTML mail. It then sends all the bits of informationbelonging to that manager off in an EMAIL to him/her. ( It uses a brilliantbit of code from sqldev.net to handle the mail)the first mail then repeats for all the managers in the listCODE ---- SP 1ALTER PROCEDURE dbo.PR_ADMIN_CLIENT_WEEKLY_NOTIFICATION_2ASbeginSET NOCOUNT ONdeclare @no_of_managers as intdeclare @current_record as intdeclare @manager_name as varchar(100)-- count how many distinct managers we need to send the mail toselect @no_of_managers = COUNT(DISTINCT manager_name) FROMdbo.vw_client_notification_email_1-- open a cursor to the same distinct listdeclare email_list cursor for select distinct manager_name fromdbo.vw_client_notification_email_1 dscopen email_list-- for each distinct manager get the managers name and pass it to the storedprocedure that generates the mail.set @current_record = 0while (@current_record) < @no_of_managersbeginfetch next from email_list into @manager_nameEXECUTE dbo.pr_admin_client_weekly_notification @manager_nameset @current_record = @current_record+1end-- close the cursorclose email_listdeallocate email_listendCODE ---- SP2ALTER PROCEDURE dbo.PR_ADMIN_CLIENT_WEEKLY_NOTIFICATION(@current_manager_name as varchar(100))-- a unique managers name is passed from the calling procedureas beginSET NOCOUNT ON-- declarations for use in the stored procedureDECLARE @to as varchar(100)DECLARE @entry varchar(500)DECLARE @region as varchar(100)DECLARE @type as varchar(100)DECLARE @site_ref as varchar(100)DECLARE @aborted as varchar(100)DECLARE @weblink as varchar(1000)DECLARE @manager_name as varchar(100)DECLARE @manager_email as varchar(100)DECLARE @body VARCHAR(8000)DECLARE @link varchar(150)DECLARE @web_base VARCHAR(150)-- set up a connection to the view that contains the details for the mailDECLARE email_contents cursor for select region,type,site_ref,aborted_visit,link,manager_name,manager_e mail fromvw_client_notification_email_1 where manager_name = @current_manager_nameopen email_contents--some initial textset @body = '<font color="#FF8040"><b>Reports W/E ' +convert(char(50),getdate()) + '</b></font><br><br> <a href = http://xxxx > Click here to logon to xxxxx </a><br><br> '--fetch the first matching record from the table and build the body of themessagefetch next from email_contents into@region,@type,@site_ref,@aborted,@link,@manager_na me,@manager_emailset @web_base = 'http://'set @weblink = @web_base + @linkif @aborted = 0 set @aborted = '' else set @aborted = 'ABORTED'set @body = @body + '<font size="2"><b> Region </b>' + @region+ ' <b>Type</b> ' + @type+ ' <b>Site Reference </b> <a href = "' + @weblink + '">' + @site_ref+'</a>'+ ' <b>Unique Report Reference </b>' + @link + '<br>'-- continue reading the records for this particular message and adding on tothe body of the textwhile(@@fetch_status = 0)beginfetch next from email_contents into@region,@type,@site_ref,@aborted,@link,@manager_na me,@manager_emailif @aborted = 0 set @aborted = '' else set @aborted = 'ABORTED'if (@@fetch_status = 0) set @body = @body + '<b> Region </b>' + @region+ ' <b>Type</b> ' + @type+ ' <b>Site Reference </b> <a href = "' + @weblink + '">' + @site_ref+'</a>'+ '<b>Unique Report Reference </b>' + @link + '<br>'end-- close the cursorset @body = @body + '</font>'close email_contentsdeallocate email_contents-- generate the mailDECLARE @rc int EXEC @rc = master.dbo.xp_smtp_sendmail@FROM = N'FROM ME',@TO = @manager_email,@server = N'server',@subject = N'Weekly Import',@message = @body,@type = N'text/html'endQuestionsis the way I've done it OK. I thought I would be able to do it in a singleSP but I really struggled nesting the cursor things.@@fetchstatus seems to be global, so if your using nested cursors, how doyou know which one you are refering to. If you have multiple calls to thesame SP how does it know which instance of the SP it refers to.When I first wrote it, I used a cursor in SP1 to call SP2, but I couldn'tget the while loop working - I have a feeling it was down to the @@fetchstatus in the 'calling' procedure being overwritten by the@@fetchstatus in the 'called' procedure.The whole @@fetchatus thing seems a bit odd. In the second procedure, I haveto fetch, then check, manipulate then fetch again, meaning that the samemanipulation code is written twice. thats why in the first procedure I usedthe select distint count to know how long the record set is so I only haveto run the manipulation code once. Is what I have done wrong?its possible that the body of the mail could be > 8K, is there anotherdatatype I can use to hold more than 8Kmany thanks for any help or adviceAndy

View 3 Replies View Related

Invalid Attempt To Read When No Data Is Present

Nov 1, 2006

I have a stored procedure that inserts a record, and then either returns an error or, when successful, returns the entire row. This is a method I use on sites I have developed in other languages when inserting or updating data; I am new to c#.

With C# I have a datareader executing the sp, and the insert works fine, however I get the error "Invalid attempt to read when no data is present." when I try to read the data that should be coming back. I have researched and updated my code so that I no longer get the error, but I still cannot get the data back. I trap the sp in profiler, ran it in anaylzer, and it works fine - data is returned. But in the code, it does not see the data.

I have modified the return results so now I just have the ID coming back and that works fine. But I would rather just return the entire row. Can this be done, and if so, how?

Thanks.

View 3 Replies View Related

The Attempt To Connect To The Report Server Failed.

Jun 9, 2007

Hi Guys,

I am working on MS Reporting Services...
This is the error I get

The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version.

The request failed with HTTP status 404: Not Found.


The following is the code(Its an aspx code).




<rsweb:ReportViewer ID ="SummarReportViewer" runat="server" Height ="760px" Width="1076px" ProcessingMode="Remote" ShowParameterPrompts="False">

<ServerReport ReportPath="/Pages/Report.aspx?ItemPath=/TestForecastReports/SummaryReport"

ReportServerUrl="http://ricsqltest2/Reports

" />

</rsweb:ReportViewer >



I am able to access the report when I hit @ http://ricsqltest2/Reports /Pages/Report.aspx?ItemPath=/TestForecastReports/SummaryReport

I also changed the code in C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesReportManagerRSWebApplication.COnfig to

<Configuration>
<UI>
<ReportServerUrl>http://ricsqltest2/Reports</ReportServerUrl>
<ReportServerVirtualDirectory></ReportServerVirtualDirectory>
<ReportBuilderTrustLevel>FullTrust</ReportBuilderTrustLevel>
</UI>
****

****

****
</Configuration>


Can any One plz help me out.

Thanks & Regards,



Mansoor.

View 3 Replies View Related

Invalid Attempt To Read When No Data Is Present

Jul 25, 2007

I am using a standard dbreader type of loop in a query to retrieve data. I am running over what should be end of record set, every time.



I have altered my read procedures to use while dbreader.read() and if dbreader.read(), to attempt to avoid getting the error. Neither is stopping it.



While debugging it, as I get to the last item and actually get the error, if I check the dbreader status, it still indicates that it has rows.



Anyone have any ideas on how to get around this?



TIA, Tom

View 3 Replies View Related

Invalid Attempt To Read When No Data Is Present?

Sep 26, 2006

when execute

If IsDBNull(sqlreader.GetValue(i)) Then

Error info:Invalid attempt to read when no data is present

but i am sure there were records

Any ideas? Regards

View 2 Replies View Related

The Attempt To Connect To The Report Server Failed

Jan 5, 2007

I have RS running on Standard server 2003 I receive the follow when trying to access the main page.



The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version



I can view reports from the location below just not view the main page.



servername/ReportServer

works fine



included error log file



01/02/07 18:10:34, ERROR , SQLDUMPER_UNKNOWN_APP.EXE, AdjustTokenPrivileges () failed (00000514)
01/02/07 18:10:34, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input parameters: 4 supplied
01/02/07 18:10:34, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ProcessID = 2364
01/02/07 18:10:34, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ThreadId = 0
01/02/07 18:10:34, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Flags = 0x0
01/02/07 18:10:34, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDumpFlags = 0x0
01/02/07 18:10:34, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, SqlInfoPtr = 0x4747EC40
01/02/07 18:10:34, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, DumpDir = <NULL>
01/02/07 18:10:34, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExceptionRecordPtr = 0x00000000
01/02/07 18:10:34, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ContextPtr = 0x00000000
01/02/07 18:10:34, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExtraFile = <NULL>
01/02/07 18:10:34, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, InstanceName = <NULL>
01/02/07 18:10:34, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ServiceName = <NULL>
01/02/07 18:10:34, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 11 not used
01/02/07 18:10:34, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 7 not used
01/02/07 18:10:34, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDump completed: D:Program FilesMicrosoft SQL ServerMSSQL.2Reporting ServicesLogFilesSQLDmpr0001.mdmp
01/02/07 18:10:34, ACTION, ReportingServicesService.exe, Watson Invoke: No






Please help anyone.



Thanks Alan

.

View 1 Replies View Related

An Attempt To Attach An Auto-named Database For File

Aug 17, 2006

I build a WebApp which i use the default DataBase that come with the App_Data folder.
I have Users and roles into that folder with all my tables regarding my new App.
Why i cant make it work under IIS on my webserver ? When i open it with Visual Studio everything works but outside of it nothing.
An attempt to attach an auto-named database for file c:inetpubwwwrootSurveyApp_Dataaspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Data Source=.SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf;
I look arround and cant find a thing on how to fix my issue. I try deleting the Folder under my User Account for SQL Express and nothing happend.

View 4 Replies View Related

Error: Invalid Attempt To Read When No Data Is Present

Jan 3, 2008

I am getting this error even though there should be data present.  When I test the SQL statement in query analyzer, it returns 1 row.
<%@ Import Namespace="System.Data.SqlClient" %><%@ Page Language="VB" MasterPageFile="~/MasterPage.master" Title="Blog" %>
<script runat="server">Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim strConnection As String = System.Configuration.ConfigurationManager.ConnectionStrings("currentConnection").ToString      'currentConnection is defined in web.config and works when used in other pages on the siteDim dbConn As SqlConnection = New SqlConnection(strConnection)
dbConn.Open()
Dim strSelectCommandFirstEntry As String = "SELECT MAX(blogEntryId) as maxID FROM site_Blog"Dim cmdFirstEntry As SqlCommand = New SqlCommand(strSelectCommandFirstEntry, dbConn)Dim rdrFirstEntryData As SqlDataReader = cmdFirstEntry.ExecuteReader()Dim strFirstEntryData As Int32 = rdrFirstEntryData(0)       'error occurs here, i have also tried rdrFirstEntryData("maxID") with same errorrdrFirstEntryData.Close()dbConn.Close()
</script>
When debugging this code and stopping on this line:
 Dim strFirstEntryData As Int32 = rdrFirstEntryData(0)
rdrFirstEntryData has the following values:hasRows = True, FieldCount=1,  Item=In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user.   and when i click the refresh button...Item = Overload resolution failed because no accessible 'Item' accepts this number of arguments.
I suspect that the note for "Item" is my clue to the source of the problem, but I don't know what it means.  Please, help.

View 2 Replies View Related

Invalid Attempt To Read When No Data Is Present Using SQLdatareader

Jul 2, 2004

I'm trying to determine if the record is NULL/empty or is valid from the datareader.

objReader = strCMD.ExecuteReader
objReader.Read()
if objReader.IsDBNull(0) = true then...

If NULL/Empty, display no records found. If records are found, display "1 or more records have been found". I keep getting the error "Invalid attempt to read when no data is present". I'm not sure what I am doing wrong here.

View 4 Replies View Related

Attempt To Fetch Logical Page ---ERROR---URGENT!!

Aug 27, 2001

Any idea what this error is??
Thanks.

Attempt to fetch logical page (3:8360) in database 'XYZ' belongs to object '1934538212', not to object 'product'. [SQLSTATE HY000] (Error 605). The step failed.

View 1 Replies View Related

Server Authentication Error - Login Attempt Failed

Oct 7, 2014

When I am trying to connect my database using SQL Server Authentication option, then its showing error: "An attempt to login suing sql authentication failed. Server is configured only for Windows authentication only."

View 8 Replies View Related

SQL 2012 :: Generating Alert From Failed Login Attempt

Sep 30, 2003

I'm trying to set up a SQL Alert to run when a Failed login error is generated. For whatever reason, I can't seem to get this working. I have it set up to run on error 18456 (Failed login), I have the server set to log failed login attempts and I can see the entry in the log file, but the alert never occurs. Basically, I want a way to detect when someone is trying to hack into my database using a brute force approach.

View 8 Replies View Related

Stuck With An Attempt To Attach An Auto-named Database...

Aug 13, 2007

View 1 Replies View Related

Stuck With An Attempt To Attach An Auto-named Database...

Aug 13, 2007

The last time I saved my Visual C# project, everything was functionning perfectly. Now, when I open my project, I have this warning on every one of my inherited forms. When I run the project, everything works fine. I've looked around for similar problems, but never found the solution that truly fits for me. Any suggestions?







An attempt to attach an auto-named database for file C:...DataBaseName.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.



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.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at GestionnaireCadet.Données.dtsGlobalTableAdapters.TRACETableAdapter.Fill(TRACEDataTable dataTable) in C:Documents and SettingsIanMes documentsVisual Studio 2005ProjectsGestionnaireCadetGestionnaireCadetDonnéesdtsGlobal.Designer.cs:line 5927
at GestionnaireCadet.frmGestionnaire.Gestionnaire_Load(Object sender, EventArgs e) in C:Documents and SettingsIanMes documentsVisual Studio 2005ProjectsGestionnaireCadetGestionnaireCadetGestionnaire.cs:line 31
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Design.DesignerFrame.Initialize(Control view)
at System.Windows.Forms.Design.DocumentDesigner.Initialize(IComponent component)
at System.Windows.Forms.Design.FormDocumentDesigner.Initialize(IComponent component)
at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo)
at System.ComponentModel.Design.DesignerHost.Add(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)



View 6 Replies View Related







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