Error With NULL Using EXECUTE SCALAR

Dec 11, 2007

I keep getting an error message when I try to place the result of an execute scalar command into a text box.  The msg is:"conversion from 'DBNull' to type 'String' is not valid"

The code I am using is:

 

Dim con as OLEDBConnection

con =NewOleDB connection("Provider = MIcrosoft.JetOLEDB.4.0, Data Source = "c:caps.mdb")

Dim cmd As OLEDBCommand

cmd= NewOLEDBCommand("Select Product from [Inventory Table] Where [Customer ID] = " & grid View1.SelectdValue

texBox1.Text = cmd.ExecuteScalar

 

The code works fine as long as there is a value for the Product.  However if the value in the database is NULL I get an error message: :"conversion from 'DBNull' to type 'String' is not valid". How do I wok around this?

Chas28

 

View 4 Replies


ADVERTISEMENT

Execute Scalar ?

Sep 20, 2007

I'm trying to do something like the code below, but it's saying "specified cast is not valid"
If i change the value returned to an "int", it works fine. My issue is, i'd like to get the value returned with more accuracy than an int as there will be 2 decimal places.protected float getProjectHours(string project)
{string selectCmd = "SELECT SUM(hours) FROM tasks WHERE project=@project";
string strConnection = ConfigurationManager.ConnectionStrings["TimeAccountingConnectionString"].ConnectionString;SqlConnection myConnection = new SqlConnection(strConnection);
SqlCommand myCommand = new SqlCommand(selectCmd, myConnection);myCommand.Parameters.Add(new SqlParameter("@project", SqlDbType.VarChar));myCommand.Parameters["@project"].Value = project;
myConnection.Open();float total = (float)myCommand.ExecuteScalar();
myConnection.Close();
return total;
}

View 6 Replies View Related

Execute Scalar Question

Sep 20, 2006

Im using the following code in my application. Is it redundent to add the "Top 1" to the select or does it help performance? Thanks string strSQL = "SELECT TOP 1 c.CusId " +
"FROM COCUS c " +
"LEFT JOIN CONOTITM n ON c.NotId = n.NotId " +
"WHERE c.CusId NOT IN(SELECT CusId FROM RDK_PROSPECT_LOCK WHERE EmpId <> '" + USER.ID() + "') " +
"ORDER BY n.DateUpdate, c.DateUpdate ASC";


string strCusID = RDK.DATA.ReturnScalar(strSQL);  

View 2 Replies View Related

Problem With Execute.scalar()

Oct 13, 2007

 Hello, I've got the following code: Dim Selected1 Dim cnn As New Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString1").ToString()) Dim SqlCommand As New Data.SqlClient.SqlCommand("SELECT [OKTipp1] FROM [ErsteSchritte] WHERE (User.Name = @UserName)", cnn) SqlCommand.Parameters.Add("@UserName", Data.SqlDbType.VarChar, 30) SqlCommand.Parameters("@UserName").Value = User.Identity.Name cnn.Open() Selected1 = SqlCommand.ExecuteScalar() cnn.Close() MsgBox(Selected1)Unfortunatly, I am given an error message. What did I do wrong?Thanks for any suggestionsRegards 

View 7 Replies View Related

Return NULL From A CLR Scalar-Valued Function

Jul 11, 2007

Hi,



I have an assembly that contains the following function:



Public Class Lookup



<SqlFunction()> _

Public Shared Function MyTest() As Integer

Return System.Data.SqlTypes.SqlInt64.Null

End Function



End Class



Then in SSMS:



CREATE ASSEMBLY IRS_MyTest

FROM '\machine empmyAssembly.dll'

GO

CREATE FUNCTION dbo.MyTest() RETURNS INT

AS EXTERNAL NAME IRS_MyTest.[MyClass].MyTest

GO



when I run:



SELECT dbo.MyTest()



the following is returned:



Msg 6522, Level 16, State 2, Line 1

A .NET Framework error occurred during execution of user defined routine or aggregate 'MyTest':

System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.

System.Data.SqlTypes.SqlNullValueException:

at System.Data.SqlTypes.SqlInt64.get_Value()

at System.Data.SqlTypes.SqlInt64.op_Explicit(SqlInt64 x)

at Informed.DCLG.IRS.SQL.IncidentTransform.Lookup.MyTest()





Can anyone please advise on how to return back a null value. Currently, my only other option is to return nothing (actually returns 0) and then wrap this up to convert the value to null - not ideal.







Thanks,



Jan.

View 1 Replies View Related

How To Grant Rights For The Anonymous IIS Web User IUSR_.. To Execute Scalar Function In Assembly

Jul 26, 2006

Dear all,

Basically I want to set chain up the rights so that the anonymous web user IUSR_ .. can execute the new .NET subs, functions etc in the assembly, just as the anonymous web user can execute Stored Procedures when granted. In this way, it should be possible to call the .NET assembly just as classic stored procedures from ASP/ASP.NET.

I have written a .NET function which I can successfully execute if I log on to the database as an administrator by sending this T-SQL query; it returns the result of a given string:

select dbo.CLRHTMLString('abc')

The scenario is now to try to grant access to this assembly for a different role (webuser), which the classic IUSR_MYSERVERNAME is a login of, so that I can call the .NET Assembly when I am authenticated as the anonymous web user (e.g. via ASP, etc.).

To test access, I created a login (webusertest) for a user (webusertest) in the same role (webuser) on the database. But when I use this login, which supposedly has the same rights as the IUSR_, execution right is denied:

EXECUTE permission denied on object 'CLRHTMLString', database 'adt_db', schema 'dbo'.

Note: The 'webuser' database role has Execute permission on the Assembly.

I have also tested this from my actual web page, with the following results:
(1) IUSR_MYSERVER member of db_owner role: Web page has right to call assembly.
(2) IUSR_MYSERVER not member of db_owner role: Web page does not have right to call assembly.

Further test results:
(3) Function can be called when making the user "webusertest" member of the "db_owner" role, which is too much rights to grant for the anonymous web user.

(4) When adding the user 'webusertest' to get 'Execute' permissions on the assembly, it does not get added. After clicking OK, there is no warning message, but when opening the Assembly Properties -> Permission dialog box the same time, the 'webusertest' user does not appear in the list.

Thankful for any advice on this matter.

View 4 Replies View Related

Must Declare The Scalar Variable Error

Jan 19, 2008

Hi All,

I'm totaly new to administrating databases.

All I want to do is run the sql server script located at http://www.data-miners.com/sql_companion.htm#downloads.

This creates some tables and uploads a series of text files into them.

When I run the script through SQL Server Express 2005 I get the error Must declare the scalar variable "@DATADIR". I suspect it's something with me putting in the wrong path.

The text files that the script needs to load into the table are located on the K drive, and I have changed the path in

declare @DATADIR varchar(128)
set @DATADIR='C:gordonookdatafinal extfiles'


to


declare @DATADIR varchar(128)
set @DATADIR='k: extfiles'

I suspect this is the wrong syntax that's why it's not working but I might be totally wrong.

The text file and the server are both saved on the k drive.

Regards,

Seaweed

View 3 Replies View Related

Must Declare The Scalar Variable @ Error

Apr 28, 2007

I am trying to run a query in the data window and get the following error. How do I resolve?



query:



select distinct [Client ID] as ClientID
FROM ITSTAFF.Incident
WHERE [Group Name] = 'ITSTAFF' and [Client ID] is not null and [Company ID] = @[Company ID]



error:



TITLE: Microsoft Report Designer
------------------------------

An error occurred while executing the query.
Must declare the scalar variable "@".

------------------------------

View 1 Replies View Related

How To Handle Error In Scalar Function?

Nov 28, 2007

Hi, I have the follow function:

CREATE FUNCTION [dbo].[ToTime]
(
@intHora int, --A valid hour
@intMin int -- A valid minute
)
RETURNS smalldatetime
AS
BEGIN
declare @strTime smalldatetime
declare @errorvar int

select @strTime=cast(convert(varchar,cast((cast(@intHora as varchar) +':'+ cast(@intMin as varchar)) as smalldatetime),108) as varchar)
return @strTime;
END

the function works perfect but when the parameter for the hour is a negative number (for example -1), or a number > 23
and the parameter for the minute is an negative number (-1) or a number > 59, the function produce an error.
I need handle this error converting the wrong value in 0, but i don't want to do this using "if statement". for example

if @intHora < 0 or @intHora >23
begin
set @intHora = 0
end
if @intMin <0 or @intMin>59
begin
set @intMin = 0
end

please, If someone know some sql function (try - catch doesn't work) to handle this kind of error or some good way to do it, please help me.

View 4 Replies View Related

Error: 'Must Declare The Scalar Variable @StartDate.'

Jan 7, 2007

Hi I’m getting an error that says “Must declare the scalar variable "@StartDate".â€? for the following line of code :
 
dt = ((DataView)(EventDataSource1.Select(dssa))).ToTable() 
 
Can anyone help me out? Here is my entire code.
 
 
 
Dim EventDataSource1 As New SqlDataSource()EventDataSource1.ConnectionString =
 
ConfigurationManager.ConnectionStrings("ASPNETDBConnectionString").ToStringDim dssa As New DataSourceSelectArguments()Dim EventID As String = ""Dim DataView = ""Dim dt As New Data.DataTableDim conn As New Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("ASPNETDBConnectionString").ToString())Dim cmd As New Data.SqlClient.SqlCommand("SELECT EventID FROM Event WHERE ([StartDate] = @StartDate)", conn)EventDataSource1.SelectCommand = ("SELECT EventID FROM Event WHERE ([StartDate] = @StartDate)")conn.Open()dt = ((DataView)(EventDataSource1.Select(dssa))).ToTable()EventID = dt.Rows(0)(0).ToString()EventDataSource1.SelectParameters.Add("@StartDate",StartDate)EventID = cmd.ExecuteScalar()tbEventIDTest.Text = EventID
 

View 2 Replies View Related

Must Declare The Scalar Variable @UserName ERROR

Aug 23, 2007

 I'm attempting to create my first login form using the CreateUserWizard. I've spent this week reading up on how to create and customizing it. I want it to 1) the required user name is an email address (which seems to be working fine) and 2) having extra information inserted into a separate customized table. I now have the form working to the point where it accepts an email address for the username and it then writes that information along with the password to the aspnetdb.mdf...but i can't get the rest of the information to write to my custom table.I am getting the error  "Must declare the scalara variable "@UserName"  here's my .cs code:public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
{
TextBox UserNameTextBox =
(TextBox)CreateUserWizardStep1.ContentTemplateContainer.FindControl("UserName");

SqlDataSource DataSource =
(SqlDataSource)CreateUserWizardStep1.ContentTemplateContainer.FindControl("InsertCustomer");

MembershipUser User = Membership.GetUser(UserNameTextBox.Text);

object UserGUID = User.ProviderUserKey;

DataSource.InsertParameters.Add("UserId", UserGUID.ToString());

DataSource.Insert();

}


protected void CreateUserWizard1_CreatingUser(object sender, LoginCancelEventArgs e)
{
CreateUserWizard cuw = (CreateUserWizard)sender;
cuw.Email = cuw.UserName;

}
}     protected void CreateUserWizard1_CreatingUser(object sender, LoginCancelEventArgs e)    {        CreateUserWizard cuw = (CreateUserWizard)sender;        cuw.Email = cuw.UserName;    }}  and the asp<asp:SqlDataSource ID="InsertCustomer" runat="server" ConnectionString="<%$ ConnectionStrings:kalistaConnectionString %>"                        InsertCommand="INSERT INTO [Customer] ([CustID], [CustEmail], [CustFN], [CustLN], [CustAddress], [CustCity], [AreaTaxID], [CustPostal_Zip], [CustCountry], [CustPhone], [CustAltPhone]) VALUES (@UserId, @UserName, @FirstName, @LastName, @Address, @City, @ProvinceState, @PostalZip, @Country, @Phone, @AltPhone)"                        ProviderName="<%$ ConnectionStrings:kalistaConnectionString.ProviderName %>">                        <InsertParameters>                            <asp:ControlParameter Name="CustEmail" Type="String" ControlID="UserName" PropertyName="Text" />                            <asp:ControlParameter Name="CustFN" Type="String" ControlID="FirstName" PropertyName="Text" />                            <asp:ControlParameter Name="CustLN" Type="String" ControlID="LastName" PropertyName="Text" />                            <asp:ControlParameter Name="CustAddress" Type="String" ControlID="Address" PropertyName="Text" />                            <asp:ControlParameter Name="CustCity" Type="String" ControlID="City" PropertyName="Text" />                            <asp:ControlParameter Name="AreaID" Type="String" ControlID="AreaID" PropertyName="SelectedValue" />                            <asp:ControlParameter Name="CustPostal_Zip" Type="String" ControlID="PostalZip" PropertyName="Text" />                            <asp:ControlParameter Name="CustCountry" Type="String" ControlID="Country" PropertyName="SelectedValue" />                            <asp:ControlParameter Name="CustPhone" Type="String" ControlID="Phone" PropertyName="Text" />                            <asp:ControlParameter Name="CustAltPhone" Type="String" ControlID="AltPhone" PropertyName="Text" />                        </InsertParameters>                    </asp:SqlDataSource>  thanks for the help

View 5 Replies View Related

Must Declare Scalar Variable Error... Need Help URGENT!

Jan 28, 2008

 doing insert using this method             Dim insertSQL As String            insertSQL = "Insert into " & myDB & " (student_name, student_passport, student_rcnumber, " & _                            "test_level, test_venue1, test_venue2, test_row, test_column, " & _                            "student_sex, student_age, student_dob,student_country, student_state, " & _                            "guardian_name, guardian_passport, guardian_relation, " & _                            "guardian_address1, guardian_address2, guardian_postcode, " & _                            "guardian_homephone, guardian_mobilephone, guardian_otherphone, " & _                            "payment, remarks, student_att) " & _                            "" & _                            "Values(@student_name, @student_passport, @student_rcnumber, " & _                            "@test_level, @test_venue1, @test_venue2, @test_row, @test_column, " & _                            "@student_sex, @student_age, @student_dob,@student_country, @student_state, " & _                            "@guardian_name, @guardian_passport, @guardian_relation, " & _                            "@guardian_address1, @guardian_address2, @guardian_postcode, " & _                            "@guardian_homephone, @guardian_mobilephone, @guardian_otherphone, " & _                            "@payment, @remarks, @student_att)"            Dim conn As New OleDbConnection(myNorthWind)            Dim cmd As New OleDbCommand(insertSQL, conn)          cmd.Parameters.AddWithValue("@student_name", txtName.Text.Trim)                cmd.Parameters.AddWithValue("@student_passport", txtPassport.Text.Trim)                cmd.Parameters.AddWithValue("@student_rcnumber", txtReceipt.Text.Trim)                cmd.Parameters.AddWithValue("@test_level", txtTestLevel.Text)                cmd.Parameters.AddWithValue("@test_venue1", txtVenue1.Text.Trim)                cmd.Parameters.AddWithValue("@test_venue2", txtVenue2.Text.Trim)                cmd.Parameters.AddWithValue("@test_row", dropAlpha.SelectedItem)                cmd.Parameters.AddWithValue("@test_column", dropNumeric.SelectedItem)                cmd.Parameters.AddWithValue("@student_sex", dropSex.SelectedItem)                cmd.Parameters.AddWithValue("@student_age", dropAge.SelectedItem)                '------------Assembly Date Format                Dim dob As New Date                dob = dropDay.SelectedItem & "/" & dropMonth.SelectedItem & "/" & dropYear.SelectedItem                dob = String.Format("{0:MM/dd/yyyy}", dob)                cmd.Parameters.AddWithValue("@student_dob", dob)                '------------End Assembly                cmd.Parameters.AddWithValue("@student_country", txtCountry.Text)                cmd.Parameters.AddWithValue("@student_state", txtState.Text)                cmd.Parameters.AddWithValue("@guardian_name", txtGdName.Text.Trim)                cmd.Parameters.AddWithValue("@guardian_passport", txtGdPassport.Text.Trim)                cmd.Parameters.AddWithValue("@guardian_relation", txtGdRelation.Text.Trim)                cmd.Parameters.AddWithValue("@guardian_address1", txtAddress1.Text.Trim)                cmd.Parameters.AddWithValue("@guardian_address2", txtAddress2.Text.Trim)                cmd.Parameters.AddWithValue("@guardian_postcode", txtPostal.Text)                cmd.Parameters.AddWithValue("@guardian_homephone", txtHome.Text)                cmd.Parameters.AddWithValue("@guardian_mobilephone", txtMobile.Text)                cmd.Parameters.AddWithValue("@guardian_otherphone", txtOther.Text)                cmd.Parameters.AddWithValue("@payment", txtPayment.Text.Trim)                cmd.Parameters.AddWithValue("@remarks", txtRemarks.Text.Trim)                If rdbAbsent.Checked = True Then                    cmd.Parameters.AddWithValue("@student_att", 0)                ElseIf rdbPresent.Checked = True Then                    cmd.Parameters.AddWithValue("@student_att", 1)                End If             conn.Open()                cmd.ExecuteNonQuery()            conn.Close()Then i got this error must declar scalar variable @student_name need some enlighten plzz T_T

View 7 Replies View Related

Need Help With SQL UPDATE...and The Error: Must Declare The Scalar Variable @UserName.

Jul 11, 2007

I am trying to update a field in a pre-existing record in my database.  This update is supposed to happen when the protected sub entitled "PictureUpload" is called by button click.  I listed the code immediately below and then I listed the error that I am getting further below that.
Does anybody know what I am doing wrong and why I am getting this error?
Thanks in advance and forgive my newbie ignorance!
 
Here is a portion of the Protected Sub that I am using in an attempt to update a field in a pre-existing record...
Protected Sub PictureUpload(ByVal sender As Object, ByVal e As System.EventArgs)
    Dim ImageUploaded As Integer = 1
    srcprofiles_BasicProperties.UpdateParameters("ImageUploaded").DefaultValue = ImageUploaded
    srcprofiles_BasicProperties.Update()
End Sub
Here is the SqlDataSource control I included on the page with (what I hope is) appropriate formatting...
<asp:SqlDataSource ID="srcprofiles_BasicProperties" runat="server" ConnectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|UserProfilesDB.mdf;Integrated Security=True;User Instance=True" ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [profiles_BasicProperties] WHERE ([UserName] = @UserName)" UpdateCommand="UPDATE [profiles_BasicProperties] SET [ImageUploaded] = @ImageUploaded WHERE ([UserName] = @UserName)">    <SelectParameters>        <asp:Parameter DefaultValue="imageuploaded01" Name="UserName" Type="String" />    </SelectParameters>    <UpdateParameters>        <asp:Parameter Name="ImageUploaded" Type="Int32" />    </UpdateParameters></asp:SqlDataSource>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...and now the error...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Server Error in '/PC_Dev' Application.


Must declare the scalar variable "@UserName".
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.Data.SqlClient.SqlException: Must declare the scalar variable "@UserName".Source Error:



Line 164: Dim ImageUploaded As Integer = 1
Line 165: srcprofiles_BasicProperties.UpdateParameters("ImageUploaded").DefaultValue = ImageUploaded
Line 166: srcprofiles_BasicProperties.Update()
Line 167:
Line 168: Source File: C:UsersMDocumentsPC_DevProfiles_BuildProfile.aspx    Line: 166 Stack Trace:



[SqlException (0x80131904): Must declare the scalar variable "@UserName".]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +859322
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +736198
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1959
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +149
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +903
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +415
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135
System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation) +401
System.Web.UI.WebControls.SqlDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +721
System.Web.UI.WebControls.SqlDataSource.Update() +17
ASP.profiles_buildprofile_aspx.PictureUpload(Object sender, EventArgs e) in C:UsersMDocumentsPC_DevProfiles_BuildProfile.aspx:166
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

View 3 Replies View Related

Must Declare The Scalar Variable @CategoryID. Error In Stored Procdure.

Dec 12, 2007

Hi People, i'm having some trouble with a stored proceddure used for an updat from a Formview.
Error message i'm getting is Must declare the scalar variable "@CategoryID".
I can't seem to work out why this is occuring and not allowing my proc to run properly. If anyone could help me that would be great :-)
Here is the whole store procedure.
 ALTER PROCEDURE dbo.DeluxeGuideAdmin_Update
@ID int,@CategoryID varchar(10),
@RegionID int,@CompanyName nvarchar(25),
@Email nvarchar(25),@PDFFront nvarchar(50),
@PDFBack nvarchar(50),@ThumbFront nvarchar(50),
@ThumbBack nvarchar(50),@Notes nvarchar(max)
 
AS
DECLARE @SQL varchar(1000)
SET @SQL = 'UPDATE DeluxeGuide SET CategoryID = @CategoryID, RegionID = @RegionID, CompanyName = @CompanyName, Email = @Email, Notes = @Notes'IF (@PDFFront IS NOT NULL) OR (@PDFFront != '')
SET @SQL = @SQL + ', PDFFront = @PDFFront'IF (@PDFBack IS NOT NULL) OR (@PDFBack != '')
SET @SQL = @SQL + ', PDFBack = @PDFBack'IF (@ThumbFront IS NOT NULL) OR (@ThumbFront != '')
SET @SQL = @SQL + ', ThumbFront = @ThumbFront'IF (@ThumbBack IS NOT NULL) OR (@ThumbBack != '')
SET @SQL = @SQL + ', ThumbBack = @ThumbBack'
SET @SQL = @SQL + ' WHERE (ID = @ID)'
Print '@SQL = ' + @SQLEXEC(@SQL)
 
RETURN

View 14 Replies View Related

Help! The Transaction Log Is Full Error In SSIS Execute SQL Task When I Execute A DELETE SQL Query

Dec 6, 2006

Dear all:

I had got the below error when I execute a DELETE SQL query in SSIS Execute SQL Task :

Error: 0xC002F210 at DelAFKO, Execute SQL Task: Executing the query "DELETE FROM [CQMS_SAP].[dbo].[AFKO]" failed with the following error: "The transaction log for database 'CQMS_SAP' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.


But my disk has large as more than 6 GB space, and I query the log_reuse_wait_desc column in sys.databases which return value as "NOTHING".

So this confused me, any one has any experience on this?

Many thanks,

Tomorrow

View 5 Replies View Related

Help With Inserting A New Record Into Database - Error Must Declare The Scalar Variable @BookMarkArrayA.

Mar 24, 2006

Hi,
Can anybody help me with this, I've got a simple program to add a new record to a table (2 items ID - Integer and Program - String) that matches all examples I can find, but when I run it I get the error :
Must declare the scalar variable "@BookMarkArrayA".
when it reaches the .insert command, I've tried using a local variable temp in place of the array element and .ToString , but still get the same error  
This is the code :
Public Sub NewCustomer()
Dim temp As String = " "
Dim ID As Integer = 1
'Restore the array from the view state
BookMarkArrayA = Me.ViewState("BookMarkArrayA")

temp = BookMarkArrayA(6)
Dim Customer As SqlDataSource = New SqlDataSource()

Customer.ConnectionString = ConfigurationManager.ConnectionStrings("CustomerConnectionString").ToString()
Customer.InsertCommand = "INSERT INTO [Table1] ([ID],[Program]) VALUES (@ID, @BookMarkArrayA(6))"
Customer.InsertParameters.Add ("ID", ID)
Customer.InsertParameters.Add ("Program", @BookMarkArrayA(6))
Customer.Insert()    

End Sub
Cheers
Ken
 

View 11 Replies View Related

RETURN Statements In Scalar Valued Functions Must Include An Argument ERROR

Aug 16, 2006

Hi,

I am trying to write a function which takes a string as input and returns the computed value.

I need to use the output of this function as a coulmn in another select query.

Here is the code (Example: @Equation = '(100*4)+12/272')

create function dbo.calc(@Equation nvarchar(100))
returns float
as
begin

return exec('SELECT CAST('+@Equation+' AS float)')
end

I am getting this error when i compile it

"RETURN statements in scalar valued functions must include an argument"

Any suggestions would be appreciated.

Please respond

Thanks

View 6 Replies View Related

SSIS Execute Package With Execute Out Of Process = True Causes ProductLevelToLow Error

Mar 6, 2008



Hi.

I have a master package, which executes child packages that are located on a SQL Server. The Child packages execute other child packages which are also located on the SQL server.

Everything works fine when I execute in process. But when I set the parameter in the mater package ExecutePackageTask to ExecuteOutOfProcess = True, I get the following error


Error: 0xC00470FE at DFT Load Data, DTS.Pipeline: SSIS Error Code DTS_E_PRODUCTLEVELTOLOW. The product level is insufficient for component "Row Count" (5349).

Error: 0xC00470FE at DFT Load Data, DTS.Pipeline: SSIS Error Code DTS_E_PRODUCTLEVELTOLOW. The product level is insufficient for component "SCR Custom Split" (6399).

Error: 0xC00470FE at DFT Load Data, DTS.Pipeline: SSIS Error Code DTS_E_PRODUCTLEVELTOLOW. The product level is insufficient for component "SCR Data Source" (5100).

Error: 0xC00470FE at DFT Load Data, DTS.Pipeline: SSIS Error Code DTS_E_PRODUCTLEVELTOLOW. The product level is insufficient for component "DST_SCR Load Data" (6149).

The child packages all run fine when executed directly, and the master package runs fine if Execute Out of Process is False.

Any help would be greatly appreciated.

Thanks

Geoff.

View 7 Replies View Related

SQL Server 2012 :: Stored Procedure Execution Error - Must Declare Scalar Variable

Oct 15, 2014

I have created stored procedure to find out first word of the keyword. I am getting error below on execution:

"Must declare the scalar variable "@SubjectBeginning"."

View 9 Replies View Related

Update Table1 Set Field1=null;commit; Where I Can Look For The User,who Execute This Statment?

Feb 11, 2008

update table1 set field1=null where id=1; commit;

where I can look for the user,who execute this statment?

It was 6.02.2007 or 7.02.2007.
All users connect using SQL Serwer Authentication.
It is test database and from 1 to 3 users connect to it, and submit not more then 10 SQl statmant per day.




View 3 Replies View Related

Execute SQL Task: Executing The Query Exec (?) Failed With The Following Error: Syntax Error Or Access Violation. Possible F

Jan 23, 2008

Hi,
I'm having an SSIS package which gives the following error when executed :

Error: 0xC002F210 at Create Linked Server, Execute SQL Task: Executing the query "exec (?)" failed with the following error: "Syntax error or access violation". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.Task failed: Create Linked Server

The package has a single Execute SQL task with the properties listed below :

General Properties
Result Set : None

ConnectionType : OLEDB
Connection : Connected to a Local Database (DB1)
SQLSourceType : Direct Input
SQL Statement : exec(?)
IsQueryStorePro : False
BypassPrepare : False

Parameter Mapping Properties

variableName Direction DataType ParameterName

User::AddLinkSql Input Varchar 0


'AddLinkSql' is a global variable of package scope of type string with the value
Exec sp_AddLinkedServer 'Srv1','','SQLOLEDB.1',@DataSrc='localhost',@catalog ='DB1'

When I try to execute the Query task, it fails with the above error. Also, the above the sql statement cannot be parsed and gives error "The query failed to parse. Syntax or access violation"

I would like to add that the above package was migrated from DTS, where it runs without any error, eventhough
it gives the same parse error message.

I would appreciate if anybody can help me out of this issue by suggeting where the problem is.

Thanks in Advance.

View 12 Replies View Related

[Execute SQL Task] Error: An Error Occurred While Assigning A Value To Variable

Jun 20, 2007

hello
I have a problem with Sql task
when sql task tried to assing a value to my variable I have this error ""La valeur n'est pas comprise dans la plage attendue."
I'm using ODBC connexion for a csv file

someone can help me ?

thanks

View 4 Replies View Related

[Execute SQL Task] Error: An Error Occurred While Assigning A Value To Variable...

Nov 8, 2006

hi chaps

i m getting the following ERROR:

[Execute SQL Task] Error: An error occurred while assigning a value to variable "JDETimezone": "Unable to find column Timezone in the result set.".



i know what the problem is i.e. no row is returned then what is the problem

here you are.... i want to it work... strange... ok i explain...

actully i have some processign to do with variable JDETimezone even no row is returned.... can u tell me the alternative to do the follwing task...

I want to retrieve a record from some table and do some processing and if no row is present or returned then i want to do seperate processing.... can ne one help me out ?



regards,

Anas

View 4 Replies View Related

Problem With Isnull. Need To Substitute Null If A Var Is Null And Compare It To Null And Return True

Sep 20, 2006

Hey. I need to substitute a value from a table if the input var is null. This is fine if the value coming from table is not null. But, it the table value is also null, it doesn't work. The problem I'm getting is in the isnull line which is in Dark green color because @inFileVersion is set to null explicitly and when the isnull function evaluates, value returned from DR.FileVersion is also null which is correct. I want the null=null to return true which is why i set ansi_nulls off. But it doesn't return anything. And the select statement should return something but in my case it returns null. If I comment the isnull statements in the where clause, everything works fine. Please tell me what am I doing wrong. Is it possible to do this without setting the ansi_nulls to off??? Thank you

set ansi_nulls off


go

declare

@inFileName VARCHAR (100),

@inFileSize INT,

@Id int,

@inlanguageid INT,

@inFileVersion VARCHAR (100),

@ExeState int

set @inFileName = 'A0006337.EXE'

set @inFileSize = 28796

set @Id= 1

set @inlanguageid =null

set @inFileVersion =NULL

set @ExeState =0

select Dr.StateID from table1 dR

where

DR.[FileName] = @inFileName

AND DR.FileSize =@inFileSize

AND DR.FileVersion = isnull(@inFileVersion,DR.FileVersion)

AND DR.languageid = isnull(@inlanguageid,null)

AND DR.[ID]= @ID

)

go

set ansi_nulls on

View 3 Replies View Related

An Error Occurred In The Service Broker Internal Activator While Trying To Scan The User Queue '(null)' For Its Status. Error: 2

Apr 25, 2007

Hello - can't find any info on this error - can anyone shed some light?



There was a deadlock - which preceeded this message by 2 seconds.







04/25/2007 08:20:12,spid108,Unknown,An error occurred in the Service Broker internal activator while trying to scan the user queue '(null)' for its status. Error: 2905<c/> State: 1.
04/25/2007 08:20:12,spid108,Unknown,External dump process return code 0x20000001.<nl/>External dump process returned no errors.
04/25/2007 08:20:12,spid108,Unknown,Stack Signature for the dump is 0x1229B5AA
04/25/2007 08:20:12,spid108,Unknown,78132A36 Module(MSVCR80+00002A36)
04/25/2007 08:20:12,spid108,Unknown,781329AA Module(MSVCR80+000029AA)
04/25/2007 08:20:12,spid108,Unknown,01447720 Module(sqlservr+00447720)
04/25/2007 08:20:12,spid108,Unknown,0144789A Module(sqlservr+0044789A)
04/25/2007 08:20:12,spid108,Unknown,0144859B Module(sqlservr+0044859B)
04/25/2007 08:20:12,spid108,Unknown,01447562 Module(sqlservr+00447562)
04/25/2007 08:20:12,spid108,Unknown,01006DAB Module(sqlservr+00006DAB)
04/25/2007 08:20:12,spid108,Unknown,01006BBC Module(sqlservr+00006BBC)
04/25/2007 08:20:12,spid108,Unknown,01006A96 Module(sqlservr+00006A96)
04/25/2007 08:20:12,spid108,Unknown,0112F65C Module(sqlservr+0012F65C)
04/25/2007 08:20:12,spid108,Unknown,0112F70F Module(sqlservr+0012F70F)
04/25/2007 08:20:12,spid108,Unknown,0112CB04 Module(sqlservr+0012CB04)
04/25/2007 08:20:12,spid108,Unknown,0112D1D1 Module(sqlservr+0012D1D1)
04/25/2007 08:20:12,spid108,Unknown,0112EA61 Module(sqlservr+0012EA61)
04/25/2007 08:20:12,spid108,Unknown,0108A5CB Module(sqlservr+0008A5CB)
04/25/2007 08:20:12,spid108,Unknown,0108A56B Module(sqlservr+0008A56B)
04/25/2007 08:20:12,spid108,Unknown,01060A5A Module(sqlservr+00060A5A)
04/25/2007 08:20:12,spid108,Unknown,01476CB2 Module(sqlservr+00476CB2)
04/25/2007 08:20:12,spid108,Unknown,01476FD3 Module(sqlservr+00476FD3)
04/25/2007 08:20:12,spid108,Unknown,017FA720 Module(sqlservr+007FA720)
04/25/2007 08:20:12,spid108,Unknown,017FAADC Module(sqlservr+007FAADC)
04/25/2007 08:20:12,spid108,Unknown,01796B1B Module(sqlservr+00796B1B)
04/25/2007 08:20:12,spid108,Unknown,01793310 Module(sqlservr+00793310)
04/25/2007 08:20:12,spid108,Unknown,0179438B Module(sqlservr+0079438B)
04/25/2007 08:20:12,spid108,Unknown,* Short Stack Dump
04/25/2007 08:20:12,spid108,Unknown,* -------------------------------------------------------------------------------
04/25/2007 08:20:12,spid108,Unknown,* *******************************************************************************
04/25/2007 08:20:12,spid108,Unknown,* SegSs: 00000023:
04/25/2007 08:20:12,spid108,Unknown,* Esp: 1302E584: 13025387 80C87378 80C872F0 00000000 78140001 0009D9C2
04/25/2007 08:20:12,spid108,Unknown,* EFlags: 00010202: 00610067 00650074 0049003B 0076006E 006C0061 00640069
04/25/2007 08:20:12,spid108,Unknown,* SegCs: 0000001B:
04/25/2007 08:20:12,spid108,Unknown,* Ebp: 1302F67C: 1302F788 01793310 13025373 80C872F0 7093AB12 801E8B38
04/25/2007 08:20:12,spid108,Unknown,* Eip: 0179438B: 828B118B 000000E0 C085D0FF 00B9850F 9D890000 FFFFEF8C
04/25/2007 08:20:12,spid108,Unknown,* Edx: 00000E38:
04/25/2007 08:20:12,spid108,Unknown,* Ecx: 00000000:
04/25/2007 08:20:12,spid108,Unknown,* Ebx: 00000000:
04/25/2007 08:20:12,spid108,Unknown,* Eax: A99EE598: 00000000 00000000 A99EE5B0 00000000 00000000 00000000
04/25/2007 08:20:12,spid108,Unknown,* Esi: 00000000:
04/25/2007 08:20:12,spid108,Unknown,* Edi: 80C872F0: 7093AB12 80C87FF0 00000007 B8A20008 7093AB15 00000000
04/25/2007 08:20:12,spid108,Unknown,*
04/25/2007 08:20:12,spid108,Unknown,* dbghelp 14200000 14312FFF 00113000
04/25/2007 08:20:12,spid108,Unknown,* sqlevn70 76780000 76913FFF 00194000
04/25/2007 08:20:12,spid108,Unknown,* sqlevn70 764A0000 76633FFF 00194000
04/25/2007 08:20:12,spid108,Unknown,* sqlevn70 76300000 76493FFF 00194000
04/25/2007 08:20:12,spid108,Unknown,* sqlevn70 341D0000 343AFFFF 001e0000
04/25/2007 08:20:12,spid108,Unknown,* sqlevn70 33590000 33764FFF 001d5000
04/25/2007 08:20:12,spid108,Unknown,* sqlevn70 333F0000 33583FFF 00194000
04/25/2007 08:20:12,spid108,Unknown,* sqlevn70 14490000 1467AFFF 001eb000
04/25/2007 08:20:12,spid108,Unknown,* sqlevn70 13D10000 13EFBFFF 001ec000
04/25/2007 08:20:12,spid108,Unknown,* OLEDB32R 13770000 13780FFF 00011000
04/25/2007 08:20:12,spid108,Unknown,* MSDART 133D0000 133E9FFF 0001a000
04/25/2007 08:20:12,spid108,Unknown,* oledb32 13350000 133C8FFF 00079000
04/25/2007 08:20:12,spid108,Unknown,* msxml3 11BD0000 11CE1FFF 00112000
04/25/2007 08:20:12,spid108,Unknown,* msxmlsql 11AF0000 11BC5FFF 000d6000
04/25/2007 08:20:12,spid108,Unknown,* System.Xml 10FA0000 11193FFF 001f4000
04/25/2007 08:20:12,spid108,Unknown,* System.Security 10F20000 10F61FFF 00042000
04/25/2007 08:20:12,spid108,Unknown,* System 10C10000 10EF3FFF 002e4000
04/25/2007 08:20:12,spid108,Unknown,* System.Security.ni 10A90000 10B45FFF 000b6000
04/25/2007 08:20:12,spid108,Unknown,* System.Transactions 0FAD0000 0FB12FFF 00043000
04/25/2007 08:20:12,spid108,Unknown,* System.ni 7A440000 7ABFDFFF 007be000
04/25/2007 08:20:12,spid108,Unknown,* System.Data 102D0000 10596FFF 002c7000
04/25/2007 08:20:12,spid108,Unknown,* mscorjit 0F910000 0F962FFF 00053000
04/25/2007 08:20:12,spid108,Unknown,* SqlAccess 0F8A0000 0F8F5FFF 00056000
04/25/2007 08:20:12,spid108,Unknown,* SensApi 0F880000 0F884FFF 00005000
04/25/2007 08:20:12,spid108,Unknown,* cryptnet 0F680000 0F691FFF 00012000
04/25/2007 08:20:12,spid108,Unknown,* SOFTPUB 0F670000 0F674FFF 00005000
04/25/2007 08:20:12,spid108,Unknown,* mscorsec 0F640000 0F652FFF 00013000
04/25/2007 08:20:12,spid108,Unknown,* mscorlib.ni 0EAC0000 0F5A7FFF 00ae8000
04/25/2007 08:20:12,spid108,Unknown,* mscorwks 080E0000 08640FFF 00561000
04/25/2007 08:20:12,spid108,Unknown,* xplog70 07CA0000 07CA2FFF 00003000
04/25/2007 08:20:12,spid108,Unknown,* xplog70 07C80000 07C8BFFF 0000c000
04/25/2007 08:20:12,spid108,Unknown,* xpstar90 07C50000 07C75FFF 00026000
04/25/2007 08:20:12,spid108,Unknown,* odbcint 07C30000 07C46FFF 00017000
04/25/2007 08:20:12,spid108,Unknown,* ATL80 7C630000 7C64AFFF 0001b000
04/25/2007 08:20:12,spid108,Unknown,* BatchParser90 07A40000 07A5EFFF 0001f000
04/25/2007 08:20:12,spid108,Unknown,* ODBC32 07A00000 07A3CFFF 0003d000
04/25/2007 08:20:12,spid108,Unknown,* SQLSCM90 079E0000 079E8FFF 00009000
04/25/2007 08:20:12,spid108,Unknown,* xpstar90 07980000 079C7FFF 00048000
04/25/2007 08:20:12,spid108,Unknown,* xpsqlbot 07960000 07965FFF 00006000
04/25/2007 08:20:12,spid108,Unknown,* msftepxy 07490000 074A4FFF 00015000
04/25/2007 08:20:12,spid108,Unknown,* SQLNCLIR 007A0000 007D2FFF 00033000
04/25/2007 08:20:12,spid108,Unknown,* comdlg32 762B0000 762F9FFF 0004a000
04/25/2007 08:20:12,spid108,Unknown,* COMCTL32 77530000 775C6FFF 00097000
04/25/2007 08:20:12,spid108,Unknown,* sqlncli 337A0000 339C1FFF 00222000
04/25/2007 08:20:12,spid108,Unknown,* CLBCatQ 777B0000 77832FFF 00083000
04/25/2007 08:20:12,spid108,Unknown,* xpsp2res 10000000 102C4FFF 002c5000
04/25/2007 08:20:12,spid108,Unknown,* ntdsapi 766F0000 76704FFF 00015000
04/25/2007 08:20:12,spid108,Unknown,* wshtcpip 070B0000 070B7FFF 00008000
04/25/2007 08:20:12,spid108,Unknown,* hnetcfg 071F0000 07248FFF 00059000
04/25/2007 08:20:12,spid108,Unknown,* dssenh 070C0000 070E3FFF 00024000
04/25/2007 08:20:12,spid108,Unknown,* imagehlp 76C10000 76C38FFF 00029000
04/25/2007 08:20:12,spid108,Unknown,* WINTRUST 76BB0000 76BDAFFF 0002b000
04/25/2007 08:20:12,spid108,Unknown,* dbghelp 06C10000 06D22FFF 00113000
04/25/2007 08:20:12,spid108,Unknown,* msfte 069B0000 06C08FFF 00259000
04/25/2007 08:20:12,spid108,Unknown,* security 06190000 06193FFF 00004000
04/25/2007 08:20:12,spid108,Unknown,* rasadhlp 76F80000 76F84FFF 00005000
04/25/2007 08:20:12,spid108,Unknown,* winrnr 76F70000 76F76FFF 00007000
04/25/2007 08:20:12,spid108,Unknown,* DNSAPI 76ED0000 76EF8FFF 00029000
04/25/2007 08:20:12,spid108,Unknown,* RESUTILS 05D50000 05D62FFF 00013000
04/25/2007 08:20:12,spid108,Unknown,* CLUSAPI 05D30000 05D41FFF 00012000
04/25/2007 08:20:12,spid108,Unknown,* OLEAUT32 77D00000 77D8BFFF 0008c000
04/25/2007 08:20:12,spid108,Unknown,* WSOCK32 71BB0000 71BB8FFF 00009000
04/25/2007 08:20:12,spid108,Unknown,* VERSION 77B90000 77B97FFF 00008000
04/25/2007 08:20:12,spid108,Unknown,* MTXCLU 05D10000 05D28FFF 00019000
04/25/2007 08:20:12,spid108,Unknown,* msvcp60 780C0000 78120FFF 00061000
04/25/2007 08:20:12,spid108,Unknown,* MSDTCPRX 05C90000 05D07FFF 00078000
04/25/2007 08:20:12,spid108,Unknown,* XOLEHLP 05C80000 05C85FFF 00006000
04/25/2007 08:20:12,spid108,Unknown,* COMRES 77010000 770D5FFF 000c6000
04/25/2007 08:20:12,spid108,Unknown,* schannel 76750000 76776FFF 00027000
04/25/2007 08:20:12,spid108,Unknown,* cryptdll 766E0000 766EBFFF 0000c000
04/25/2007 08:20:12,spid108,Unknown,* kerberos 05BC0000 05C17FFF 00058000
04/25/2007 08:20:12,spid108,Unknown,* iphlpapi 76CF0000 76D09FFF 0001a000
04/25/2007 08:20:12,spid108,Unknown,* msv1_0 76C90000 76CB6FFF 00027000
04/25/2007 08:20:12,spid108,Unknown,* MSCOREE 05950000 05994FFF 00045000
04/25/2007 08:20:12,spid108,Unknown,* AUTHZ 76C40000 76C53FFF 00014000
04/25/2007 08:20:12,spid108,Unknown,* rsaenh 04E90000 04EBEFFF 0002f000
04/25/2007 08:20:12,spid108,Unknown,* WLDAP32 76F10000 76F3DFFF 0002e000
04/25/2007 08:20:12,spid108,Unknown,* SAMLIB 5CCF0000 5CCFEFFF 0000f000
04/25/2007 08:20:12,spid108,Unknown,* ole32 77670000 777A3FFF 00134000
04/25/2007 08:20:12,spid108,Unknown,* NTMARTA 77E00000 77E21FFF 00022000
04/25/2007 08:20:12,spid108,Unknown,* SQLOS 344D0000 344D4FFF 00005000
04/25/2007 08:20:12,spid108,Unknown,* sqlevn70 4F610000 4F7A3FFF 00194000
04/25/2007 08:20:12,spid108,Unknown,* instapi 48060000 48069FFF 0000a000
04/25/2007 08:20:12,spid108,Unknown,* psapi 76B70000 76B7AFFF 0000b000
04/25/2007 08:20:12,spid108,Unknown,* comctl32 77420000 77522FFF 00103000
04/25/2007 08:20:12,spid108,Unknown,* SHLWAPI 77DA0000 77DF1FFF 00052000
04/25/2007 08:20:12,spid108,Unknown,* SHELL32 7C8D0000 7D0D2FFF 00803000
04/25/2007 08:20:12,spid108,Unknown,* NETAPI32 71C40000 71C97FFF 00058000
04/25/2007 08:20:12,spid108,Unknown,* opends60 333E0000 333E6FFF 00007000
04/25/2007 08:20:12,spid108,Unknown,* USERENV 76920000 769E3FFF 000c4000
04/25/2007 08:20:12,spid108,Unknown,* WS2HELP 71BF0000 71BF7FFF 00008000
04/25/2007 08:20:12,spid108,Unknown,* WS2_32 71C00000 71C16FFF 00017000
04/25/2007 08:20:12,spid108,Unknown,* MSWSOCK 71B20000 71B60FFF 00041000
04/25/2007 08:20:12,spid108,Unknown,* Secur32 76F50000 76F62FFF 00013000
04/25/2007 08:20:12,spid108,Unknown,* MSASN1 76190000 761A1FFF 00012000
04/25/2007 08:20:12,spid108,Unknown,* CRYPT32 761B0000 76242FFF 00093000
04/25/2007 08:20:12,spid108,Unknown,* GDI32 77C00000 77C47FFF 00048000
04/25/2007 08:20:12,spid108,Unknown,* USER32 77380000 77411FFF 00092000
04/25/2007 08:20:12,spid108,Unknown,* RPCRT4 77C50000 77CEEFFF 0009f000
04/25/2007 08:20:12,spid108,Unknown,* ADVAPI32 77F50000 77FEBFFF 0009c000
04/25/2007 08:20:12,spid108,Unknown,* MSVCP80 7C420000 7C4A6FFF 00087000
04/25/2007 08:20:12,spid108,Unknown,* msvcrt 77BA0000 77BF9FFF 0005a000
04/25/2007 08:20:12,spid108,Unknown,* MSVCR80 78130000 781CAFFF 0009b000
04/25/2007 08:20:12,spid108,Unknown,* kernel32 77E40000 77F41FFF 00102000
04/25/2007 08:20:12,spid108,Unknown,* ntdll 7C800000 7C8BFFFF 000c0000
04/25/2007 08:20:12,spid108,Unknown,* sqlservr 01000000 02BCEFFF 01bcf000
04/25/2007 08:20:12,spid108,Unknown,* MODULE BASE END SIZE
04/25/2007 08:20:12,spid108,Unknown,*
04/25/2007 08:20:12,spid108,Unknown,*
04/25/2007 08:20:12,spid108,Unknown,* Access Violation occurred reading address 00000000
04/25/2007 08:20:12,spid108,Unknown,* Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
04/25/2007 08:20:12,spid108,Unknown,* Exception Address = 0179438B Module(sqlservr+0079438B)
04/25/2007 08:20:12,spid108,Unknown,*
04/25/2007 08:20:12,spid108,Unknown,*
04/25/2007 08:20:12,spid108,Unknown,* 04/25/07 08:20:12 spid 108
04/25/2007 08:20:12,spid108,Unknown,* BEGIN STACK DUMP:
04/25/2007 08:20:12,spid108,Unknown,*
04/25/2007 08:20:12,spid108,Unknown,* *******************************************************************************
04/25/2007 08:20:12,spid108,Unknown,SqlDumpExceptionHandler: Process 108 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
04/25/2007 08:20:12,spid108,Unknown,***Stack Dump being sent to D:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLLOGSQLDump0007.txt
04/25/2007 08:20:12,spid108,Unknown,Using 'dbghelp.dll' version '4.0.5'
04/25/2007 08:20:12,spid60,Unknown,An error occurred in the Service Broker internal activator while trying to scan the user queue '(null)' for its status. Error: 2905<c/> State: 1.
04/25/2007 08:20:12,spid60,Unknown,External dump process return code 0x20000001.<nl/>External dump process returned no errors.
04/25/2007 08:20:10,spid60,Unknown,Stack Signature for the dump is 0x1229B5AA
04/25/2007 08:20:10,spid60,Unknown,78132A36 Module(MSVCR80+00002A36)
04/25/2007 08:20:10,spid60,Unknown,781329AA Module(MSVCR80+000029AA)
04/25/2007 08:20:10,spid60,Unknown,01447720 Module(sqlservr+00447720)
04/25/2007 08:20:10,spid60,Unknown,0144789A Module(sqlservr+0044789A)
04/25/2007 08:20:10,spid60,Unknown,0144859B Module(sqlservr+0044859B)
04/25/2007 08:20:10,spid60,Unknown,01447562 Module(sqlservr+00447562)
04/25/2007 08:20:10,spid60,Unknown,01006DAB Module(sqlservr+00006DAB)
04/25/2007 08:20:10,spid60,Unknown,01006BBC Module(sqlservr+00006BBC)
04/25/2007 08:20:10,spid60,Unknown,01006A96 Module(sqlservr+00006A96)
04/25/2007 08:20:10,spid60,Unknown,0112F65C Module(sqlservr+0012F65C)
04/25/2007 08:20:10,spid60,Unknown,0112F70F Module(sqlservr+0012F70F)
04/25/2007 08:20:10,spid60,Unknown,0112CB04 Module(sqlservr+0012CB04)
04/25/2007 08:20:10,spid60,Unknown,0112D1D1 Module(sqlservr+0012D1D1)
04/25/2007 08:20:10,spid60,Unknown,0112EA61 Module(sqlservr+0012EA61)
04/25/2007 08:20:10,spid60,Unknown,0108A5CB Module(sqlservr+0008A5CB)
04/25/2007 08:20:10,spid60,Unknown,0108A56B Module(sqlservr+0008A56B)
04/25/2007 08:20:10,spid60,Unknown,01060A5A Module(sqlservr+00060A5A)
04/25/2007 08:20:10,spid60,Unknown,01476CB2 Module(sqlservr+00476CB2)
04/25/2007 08:20:10,spid60,Unknown,01476FD3 Module(sqlservr+00476FD3)
04/25/2007 08:20:10,spid60,Unknown,017FA720 Module(sqlservr+007FA720)
04/25/2007 08:20:10,spid60,Unknown,017FAADC Module(sqlservr+007FAADC)
04/25/2007 08:20:10,spid60,Unknown,01796B1B Module(sqlservr+00796B1B)
04/25/2007 08:20:10,spid60,Unknown,01793310 Module(sqlservr+00793310)
04/25/2007 08:20:10,spid60,Unknown,0179438B Module(sqlservr+0079438B)
04/25/2007 08:20:10,spid60,Unknown,* Short Stack Dump
04/25/2007 08:20:10,spid60,Unknown,* -------------------------------------------------------------------------------
04/25/2007 08:20:10,spid60,Unknown,* *******************************************************************************
04/25/2007 08:20:10,spid60,Unknown,* SegSs: 00000023:
04/25/2007 08:20:10,spid60,Unknown,* Esp: 1189E584: 11895387 80C87378 80C872F0 00000000 03E90001 00087C2D
04/25/2007 08:20:10,spid60,Unknown,* EFlags: 00010202: 00610067 00650074 0049003B 0076006E 006C0061 00640069
04/25/2007 08:20:10,spid60,Unknown,* SegCs: 0000001B:
04/25/2007 08:20:10,spid60,Unknown,* Ebp: 1189F67C: 1189F788 01793310 11895373 80C872F0 7093AB12 801E8B38
04/25/2007 08:20:10,spid60,Unknown,* Eip: 0179438B: 828B118B 000000E0 C085D0FF 00B9850F 9D890000 FFFFEF8C
04/25/2007 08:20:10,spid60,Unknown,* Edx: 00000E38:
04/25/2007 08:20:10,spid60,Unknown,* Ecx: 00000000:
04/25/2007 08:20:10,spid60,Unknown,* Ebx: 00000000:
04/25/2007 08:20:10,spid60,Unknown,* Eax: 5ADE8598: 00000000 00000000 5ADE85B0 00000000 00000000 00000000
04/25/2007 08:20:10,spid60,Unknown,* Esi: 00000000:
04/25/2007 08:20:10,spid60,Unknown,* Edi: 80C872F0: 7093AB12 80C87FF0 00000007 B8A20008 7093AB15 00000000
04/25/2007 08:20:10,spid60,Unknown,*
04/25/2007 08:20:10,spid60,Unknown,* dbghelp 14200000 14312FFF 00113000
04/25/2007 08:20:10,spid60,Unknown,* sqlevn70 76780000 76913FFF 00194000
04/25/2007 08:20:10,spid60,Unknown,* sqlevn70 764A0000 76633FFF 00194000
04/25/2007 08:20:10,spid60,Unknown,* sqlevn70 76300000 76493FFF 00194000
04/25/2007 08:20:10,spid60,Unknown,* sqlevn70 341D0000 343AFFFF 001e0000
04/25/2007 08:20:10,spid60,Unknown,* sqlevn70 33590000 33764FFF 001d5000
04/25/2007 08:20:10,spid60,Unknown,* sqlevn70 333F0000 33583FFF 00194000
04/25/2007 08:20:10,spid60,Unknown,* sqlevn70 14490000 1467AFFF 001eb000
04/25/2007 08:20:10,spid60,Unknown,* sqlevn70 13D10000 13EFBFFF 001ec000
04/25/2007 08:20:10,spid60,Unknown,* OLEDB32R 13770000 13780FFF 00011000
04/25/2007 08:20:10,spid60,Unknown,* MSDART 133D0000 133E9FFF 0001a000
04/25/2007 08:20:10,spid60,Unknown,* oledb32 13350000 133C8FFF 00079000
04/25/2007 08:20:10,spid60,Unknown,* msxml3 11BD0000 11CE1FFF 00112000
04/25/2007 08:20:10,spid60,Unknown,* msxmlsql 11AF0000 11BC5FFF 000d6000
04/25/2007 08:20:10,spid60,Unknown,* System.Xml 10FA0000 11193FFF 001f4000
04/25/2007 08:20:10,spid60,Unknown,* System.Security 10F20000 10F61FFF 00042000
04/25/2007 08:20:10,spid60,Unknown,* System 10C10000 10EF3FFF 002e4000
04/25/2007 08:20:10,spid60,Unknown,* System.Security.ni 10A90000 10B45FFF 000b6000
04/25/2007 08:20:10,spid60,Unknown,* System.Transactions 0FAD0000 0FB12FFF 00043000
04/25/2007 08:20:10,spid60,Unknown,* System.ni 7A440000 7ABFDFFF 007be000
04/25/2007 08:20:10,spid60,Unknown,* System.Data 102D0000 10596FFF 002c7000
04/25/2007 08:20:10,spid60,Unknown,* mscorjit 0F910000 0F962FFF 00053000
04/25/2007 08:20:10,spid60,Unknown,* SqlAccess 0F8A0000 0F8F5FFF 00056000
04/25/2007 08:20:10,spid60,Unknown,* SensApi 0F880000 0F884FFF 00005000
04/25/2007 08:20:10,spid60,Unknown,* cryptnet 0F680000 0F691FFF 00012000
04/25/2007 08:20:10,spid60,Unknown,* SOFTPUB 0F670000 0F674FFF 00005000
04/25/2007 08:20:10,spid60,Unknown,* mscorsec 0F640000 0F652FFF 00013000
04/25/2007 08:20:10,spid60,Unknown,* mscorlib.ni 0EAC0000 0F5A7FFF 00ae8000
04/25/2007 08:20:10,spid60,Unknown,* mscorwks 080E0000 08640FFF 00561000
04/25/2007 08:20:10,spid60,Unknown,* xplog70 07CA0000 07CA2FFF 00003000
04/25/2007 08:20:10,spid60,Unknown,* xplog70 07C80000 07C8BFFF 0000c000
04/25/2007 08:20:10,spid60,Unknown,* xpstar90 07C50000 07C75FFF 00026000
04/25/2007 08:20:10,spid60,Unknown,* odbcint 07C30000 07C46FFF 00017000
04/25/2007 08:20:10,spid60,Unknown,* ATL80 7C630000 7C64AFFF 0001b000
04/25/2007 08:20:10,spid60,Unknown,* BatchParser90 07A40000 07A5EFFF 0001f000
04/25/2007 08:20:10,spid60,Unknown,* ODBC32 07A00000 07A3CFFF 0003d000
04/25/2007 08:20:10,spid60,Unknown,* SQLSCM90 079E0000 079E8FFF 00009000
04/25/2007 08:20:10,spid60,Unknown,* xpstar90 07980000 079C7FFF 00048000
04/25/2007 08:20:10,spid60,Unknown,* xpsqlbot 07960000 07965FFF 00006000
04/25/2007 08:20:10,spid60,Unknown,* msftepxy 07490000 074A4FFF 00015000
04/25/2007 08:20:10,spid60,Unknown,* SQLNCLIR 007A0000 007D2FFF 00033000
04/25/2007 08:20:10,spid60,Unknown,* comdlg32 762B0000 762F9FFF 0004a000
04/25/2007 08:20:10,spid60,Unknown,* COMCTL32 77530000 775C6FFF 00097000
04/25/2007 08:20:10,spid60,Unknown,* sqlncli 337A0000 339C1FFF 00222000
04/25/2007 08:20:10,spid60,Unknown,* CLBCatQ 777B0000 77832FFF 00083000
04/25/2007 08:20:10,spid60,Unknown,* xpsp2res 10000000 102C4FFF 002c5000
04/25/2007 08:20:10,spid60,Unknown,* ntdsapi 766F0000 76704FFF 00015000
04/25/2007 08:20:10,spid60,Unknown,* wshtcpip 070B0000 070B7FFF 00008000
04/25/2007 08:20:10,spid60,Unknown,* hnetcfg 071F0000 07248FFF 00059000
04/25/2007 08:20:10,spid60,Unknown,* dssenh 070C0000 070E3FFF 00024000
04/25/2007 08:20:10,spid60,Unknown,* imagehlp 76C10000 76C38FFF 00029000
04/25/2007 08:20:10,spid60,Unknown,* WINTRUST 76BB0000 76BDAFFF 0002b000
04/25/2007 08:20:10,spid60,Unknown,* dbghelp 06C10000 06D22FFF 00113000
04/25/2007 08:20:10,spid60,Unknown,* msfte 069B0000 06C08FFF 00259000
04/25/2007 08:20:10,spid60,Unknown,* security 06190000 06193FFF 00004000
04/25/2007 08:20:10,spid60,Unknown,* rasadhlp 76F80000 76F84FFF 00005000
04/25/2007 08:20:10,spid60,Unknown,* winrnr 76F70000 76F76FFF 00007000
04/25/2007 08:20:10,spid60,Unknown,* DNSAPI 76ED0000 76EF8FFF 00029000
04/25/2007 08:20:10,spid60,Unknown,* RESUTILS 05D50000 05D62FFF 00013000
04/25/2007 08:20:10,spid60,Unknown,* CLUSAPI 05D30000 05D41FFF 00012000
04/25/2007 08:20:10,spid60,Unknown,* OLEAUT32 77D00000 77D8BFFF 0008c000
04/25/2007 08:20:10,spid60,Unknown,* WSOCK32 71BB0000 71BB8FFF 00009000
04/25/2007 08:20:10,spid60,Unknown,* VERSION 77B90000 77B97FFF 00008000
04/25/2007 08:20:10,spid60,Unknown,* MTXCLU 05D10000 05D28FFF 00019000
04/25/2007 08:20:10,spid60,Unknown,* msvcp60 780C0000 78120FFF 00061000
04/25/2007 08:20:10,spid60,Unknown,* MSDTCPRX 05C90000 05D07FFF 00078000
04/25/2007 08:20:10,spid60,Unknown,* XOLEHLP 05C80000 05C85FFF 00006000
04/25/2007 08:20:10,spid60,Unknown,* COMRES 77010000 770D5FFF 000c6000
04/25/2007 08:20:10,spid60,Unknown,* schannel 76750000 76776FFF 00027000
04/25/2007 08:20:10,spid60,Unknown,* cryptdll 766E0000 766EBFFF 0000c000
04/25/2007 08:20:10,spid60,Unknown,* kerberos 05BC0000 05C17FFF 00058000
04/25/2007 08:20:10,spid60,Unknown,* iphlpapi 76CF0000 76D09FFF 0001a000
04/25/2007 08:20:10,spid60,Unknown,* msv1_0 76C90000 76CB6FFF 00027000
04/25/2007 08:20:10,spid60,Unknown,* MSCOREE 05950000 05994FFF 00045000
04/25/2007 08:20:10,spid60,Unknown,* AUTHZ 76C40000 76C53FFF 00014000
04/25/2007 08:20:10,spid60,Unknown,* rsaenh 04E90000 04EBEFFF 0002f000
04/25/2007 08:20:10,spid60,Unknown,* WLDAP32 76F10000 76F3DFFF 0002e000
04/25/2007 08:20:10,spid60,Unknown,* SAMLIB 5CCF0000 5CCFEFFF 0000f000
04/25/2007 08:20:10,spid60,Unknown,* ole32 77670000 777A3FFF 00134000
04/25/2007 08:20:10,spid60,Unknown,* NTMARTA 77E00000 77E21FFF 00022000
04/25/2007 08:20:10,spid60,Unknown,* SQLOS 344D0000 344D4FFF 00005000
04/25/2007 08:20:10,spid60,Unknown,* sqlevn70 4F610000 4F7A3FFF 00194000
04/25/2007 08:20:10,spid60,Unknown,* instapi 48060000 48069FFF 0000a000
04/25/2007 08:20:10,spid60,Unknown,* psapi 76B70000 76B7AFFF 0000b000
04/25/2007 08:20:10,spid60,Unknown,* comctl32 77420000 77522FFF 00103000
04/25/2007 08:20:10,spid60,Unknown,* SHLWAPI 77DA0000 77DF1FFF 00052000
04/25/2007 08:20:10,spid60,Unknown,* SHELL32 7C8D0000 7D0D2FFF 00803000
04/25/2007 08:20:10,spid60,Unknown,* NETAPI32 71C40000 71C97FFF 00058000
04/25/2007 08:20:10,spid60,Unknown,* opends60 333E0000 333E6FFF 00007000
04/25/2007 08:20:10,spid60,Unknown,* USERENV 76920000 769E3FFF 000c4000
04/25/2007 08:20:10,spid60,Unknown,* WS2HELP 71BF0000 71BF7FFF 00008000
04/25/2007 08:20:10,spid60,Unknown,* WS2_32 71C00000 71C16FFF 00017000
04/25/2007 08:20:10,spid60,Unknown,* MSWSOCK 71B20000 71B60FFF 00041000
04/25/2007 08:20:10,spid60,Unknown,* Secur32 76F50000 76F62FFF 00013000
04/25/2007 08:20:10,spid60,Unknown,* MSASN1 76190000 761A1FFF 00012000
04/25/2007 08:20:10,spid60,Unknown,* CRYPT32 761B0000 76242FFF 00093000
04/25/2007 08:20:10,spid60,Unknown,* GDI32 77C00000 77C47FFF 00048000
04/25/2007 08:20:10,spid60,Unknown,* USER32 77380000 77411FFF 00092000
04/25/2007 08:20:10,spid60,Unknown,* RPCRT4 77C50000 77CEEFFF 0009f000
04/25/2007 08:20:10,spid60,Unknown,* ADVAPI32 77F50000 77FEBFFF 0009c000
04/25/2007 08:20:10,spid60,Unknown,* MSVCP80 7C420000 7C4A6FFF 00087000
04/25/2007 08:20:10,spid60,Unknown,* msvcrt 77BA0000 77BF9FFF 0005a000
04/25/2007 08:20:10,spid60,Unknown,* MSVCR80 78130000 781CAFFF 0009b000
04/25/2007 08:20:10,spid60,Unknown,* kernel32 77E40000 77F41FFF 00102000
04/25/2007 08:20:10,spid60,Unknown,* ntdll 7C800000 7C8BFFFF 000c0000
04/25/2007 08:20:10,spid60,Unknown,* sqlservr 01000000 02BCEFFF 01bcf000
04/25/2007 08:20:10,spid60,Unknown,* MODULE BASE END SIZE
04/25/2007 08:20:10,spid60,Unknown,*
04/25/2007 08:20:10,spid60,Unknown,*
04/25/2007 08:20:10,spid60,Unknown,* Access Violation occurred reading address 00000000
04/25/2007 08:20:10,spid60,Unknown,* Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
04/25/2007 08:20:10,spid60,Unknown,* Exception Address = 0179438B Module(sqlservr+0079438B)
04/25/2007 08:20:10,spid60,Unknown,*
04/25/2007 08:20:10,spid60,Unknown,*
04/25/2007 08:20:10,spid60,Unknown,* 04/25/07 08:20:10 spid 60
04/25/2007 08:20:10,spid60,Unknown,* BEGIN STACK DUMP:
04/25/2007 08:20:10,spid60,Unknown,*
04/25/2007 08:20:10,spid60,Unknown,* *******************************************************************************
04/25/2007 08:20:10,spid60,Unknown,SqlDumpExceptionHandler: Process 60 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
04/25/2007 08:20:10,spid60,Unknown,***Stack Dump being sent to D:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLLOGSQLDump0006.txt
04/25/2007 08:20:10,spid60,Unknown,Using 'dbghelp.dll' version '4.0.5'

View 5 Replies View Related

Error Running SP From ADO 2.6 And VB6 - Command.execute Error

Aug 9, 2006



Hi there

I have small problem with the ADO 2.6 - 2.8 Command object.

I created a Stored procedure preforming some tasks within a tran.

whitin the tran i'm collecting the @@ERROR values and in the end (after tran closing )generating the correct error string - which will be send back to the caller



in the VB6 app, i'm using a command object with the next line:

Set MyRecordset= MyCommand.Execute

In all the cases and option, when i run the SP - the command preform the tasks and return closed recordset (with the currect answer) and i can't read it.

the only solution that worked until now: i need to call MyRecordset.Open which will requery the SP again and generate an error (User defined error).

It happens only when i run command.execute with SP that preforms multitasks and return result recordset.



CAN ANY ONE HELP ME

View 1 Replies View Related

Data Mining - Scalar Mining Structure Column Data Type Error...

May 31, 2006

Hoping someone will have a solution for this error

Errors in the metadata manager. The data type of the '~CaseDetail ~MG-Fact Voic~6' measure must be the same as its source data type. This is because the aggregate function is not set to count or distinct count.

Is the problem due to the data type of the column used in the mining structure is Long, and the underlying field in the cube has a type of BigInt,or am I barking up the wrong tree?

View 16 Replies View Related

Newbie Need Help. Export Error, Null Value Error.

Sep 24, 2004

Hey all,

I'm currently using a shopping cart software called .netCart, which is in ASP.NET and VB. I have been trying to import my local "fully working" database to my remote server using Enterprise Manager via the DTS Export/Import Wizard, but then the exported remote database is not working with the software. Unfortunately, I have no prior experiences in MS SQL database at all, nor do I know anything about the scripts they used with the software I purchased.

Error message when attempting to run part of the software (website) with the exported database -

"Cannot insert the value NULL into column 'CustomerID', table 'tablename.dbo.Customers'; column does not allow nulls. INSERT fails. The statement has been terminated. [Customer Table]"

I simply used the DTS wizard to export the database. All settings are left "default" because I don't know what I should do about them....

1) At Specify Table Copy or Quert, "Copy table(s) and view(s) from the source database is selected.
2) Selected all tables. At the "Column Mappings and Transformations" window for all tables, "Create detination table" is SELECTED and "Enable identify insert" is UNCHECKED.
3) At one of the error table (i.e. Customers), the CustomerID int is NOT NULL.

Sorry, I do not know what's wrong with it, and I don't know how to explain it better technically. The software company do not support this as well.

I believe the problem is with the settings in the DTS wizard when I try to export the database. Something is not set right, but I don't know how to do it.

Can anyone please try to solve this problem for me? Thank you very much.

Temjin

View 2 Replies View Related

Error On Sp Execute! - Pls Help

Apr 11, 2008

Message Preview
Hi,

I'm not sure if this post is in the correct section but here goes.

I have a sp that when executed inserts data into two tables(shown below). The sp works fine when the correct information is inserted into the tables but when you try and insert data that breaks the constraints in the table it obviously errors, but it seems to inert a new row in to the tmptimesheet table(error message shown below). When you open the tmptimesheet table there isn’t the row of a data there but if you run this (SELECT IDENT_CURRENT('tmptimmesheets') after the error it will come back with a id one higher than what’s in the table. Then the next time you run the sp a record will be inserted into the tmptimesheet table and not in to the tmptimsheethours table!? I’m at a total lost at what to do can someone please help!?


Thanks in advance Dave



CREATE TABLE [dbo].[tmptimesheets](
[TimesheetID] [int] IDENTITY(1,1) NOT NULL,
[Placementid] [int] NOT NULL,
[Periodstarting] [datetime] NOT NULL,
[createdon] [datetime] NOT NULL,
[createduserid] [int] NOT NULL,
[Issued] [nchar](1) COLLATE Latin1_General_CI_AS NOT NULL,
[ReadyForBilling] [nchar](1) COLLATE Latin1_General_CI_AS NOT NULL,
[Reject] [nchar](1) COLLATE Latin1_General_CI_AS NULL,
[Comments] [text] COLLATE Latin1_General_CI_AS NULL,
[Rate] [nchar](1) COLLATE Latin1_General_CI_AS NOT NULL,
CONSTRAINT [PK_tmptimesheets] PRIMARY KEY CLUSTERED
(
[TimesheetID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY],
CONSTRAINT [IX_tmptimesheets_1] UNIQUE NONCLUSTERED
(
[Placementid] ASC,
[Periodstarting] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]







CREATE TABLE [dbo].[tmptimesheethours](
[TmpTimesheethourid] [int] IDENTITY(1,1) NOT NULL,
[Timesheetid] [int] NOT NULL,
[applicantid] [int] NOT NULL,
[Workedon] [datetime] NOT NULL,
[Hoursworked] [numeric](10, 2) NOT NULL,
[performancevalueid] [int] NOT NULL,
[Reject] [ntext] COLLATE Latin1_General_CI_AS NULL,
[Breaks] [numeric](10, 2) NOT NULL,
CONSTRAINT [PK_tmptimesheethours] PRIMARY KEY CLUSTERED
(
[TmpTimesheethourid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
USE [Pronet_TS]
GO
ALTER TABLE [dbo].[tmptimesheethours] WITH NOCHECK ADD CONSTRAINT [FK_TimesheetHours_Timesheets] FOREIGN KEY([Timesheetid])
REFERENCES [dbo].[tmptimesheets] ([TimesheetID])
GO
ALTER TABLE [dbo].[tmptimesheethours] CHECK CONSTRAINT [FK_TimesheetHours_Timesheets]







Error Message
Msg 2627, Level 14, State 1, Procedure sp_tmptimesheet_insert_day, Line 40
Violation of UNIQUE KEY constraint 'IX_tmptimesheets_1'. Cannot insert duplicate key in object 'dbo.tmptimesheets'.
The statement has been terminated.
Msg 547, Level 16, State 0, Procedure sp_tmptimesheet_insert_day, Line 65
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_TimesheetHours_Timesheets". The conflict occurred in database "Pronet_TS", table "dbo.tmptimesheets", column 'TimesheetID'.
The statement has been terminated.
Msg 547, Level 16, State 0, Procedure sp_tmptimesheet_insert_day, Line 86
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_TimesheetHours_Timesheets". The conflict occurred in database "Pronet_TS", table "dbo.tmptimesheets", column 'TimesheetID'.
The statement has been terminated.
Msg 547, Level 16, State 0, Procedure sp_tmptimesheet_insert_day, Line 108
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_TimesheetHours_Timesheets". The conflict occurred in database "Pronet_TS", table "dbo.tmptimesheets", column 'TimesheetID'.
The statement has been terminated.
Msg 547, Level 16, State 0, Procedure sp_tmptimesheet_insert_day, Line 130
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_TimesheetHours_Timesheets". The conflict occurred in database "Pronet_TS", table "dbo.tmptimesheets", column 'TimesheetID'.
The statement has been terminated.
Msg 547, Level 16, State 0, Procedure sp_tmptimesheet_insert_day, Line 153
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_TimesheetHours_Timesheets". The conflict occurred in database "Pronet_TS", table "dbo.tmptimesheets", column 'TimesheetID'.
The statement has been terminated.
Msg 547, Level 16, State 0, Procedure sp_tmptimesheet_insert_day, Line 178
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_TimesheetHours_Timesheets". The conflict occurred in database "Pronet_TS", table "dbo.tmptimesheets", column 'TimesheetID'.
The statement has been terminated.
Msg 547, Level 16, State 0, Procedure sp_tmptimesheet_insert_day, Line 200
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_TimesheetHours_Timesheets". The conflict occurred in database "Pronet_TS", table "dbo.tmptimesheets", column 'TimesheetID'.
The statement has been terminated.
Msg 3902, Level 16, State 1, Procedure sp_tmptimesheet_insert_day, Line 223
The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.

(1 row(s) affected)

View 14 Replies View Related

Execute As Error

Jul 28, 2006

I have a stored procedure that needs to run with elevated privliges, so I tried setting it to run as one of the db owners. When a regular user tries to execute the SP, I get the error

Cannot execute as the database principal because the principal
"joejoe" does not exist, this type of principal cannot be impersonated, or
you do not have permission.

What do I need to set up so a user can be impersonated?

View 11 Replies View Related

Null Error

Aug 2, 2007

Data Source: Oracle 10g R2
Data DestinationQL Server 2000

The date data in Oracle is stored as Number. i.e. yyyymmdd
So I am moving the date data from Number(8,0) to datetime field. I using script component to convert the data to mm/dd/yyyy.
When there is no data at the source I do not want to populate the destination datetime column. I want to keep it as Null.
So ....
My script looks like this....

if SourceData.Length = 8 then
Populate the destination data
end if
I am getting error when I hit the row which does not have date data.
How to solve the above problem.
Thank you,
Smith

View 3 Replies View Related

Execute NonQuery Error

Jun 16, 2008

 I have created an app that requires a registration, but when I run the app I get the following error from the Registration page.  Can someone please help?  Thanks in advance.
 String was not recognized as a valid DateTime.
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.FormatException: String was not recognized as a valid DateTime.Source Error:



Line 58: cmdCommandIns.Parameters.Add("@zipCode", SqlDbType.Int).Value = txbzipCode.Text
Line 59: cmdCommandIns.Parameters.Add("@email", SqlDbType.VarChar, 80).Value = txbemail.Text
Line 60: cmdCommandIns.ExecuteNonQuery()
Line 61: cnnConnection.Close()
Line 62:  Private Sub Page_Load()
lblDateStamp.Text = Date.Now
End Sub
'Create Global SQLConnection, Insert SQLCommand ObjectsDim Ds As DataSet
Dim connString1 As String = ConfigurationSettings.AppSettings("connString1") 'iscorp/eVisitsDim cnnConnection As New System.Data.SqlClient.SqlConnection(connString1)
Dim cmdCommandIns As New System.Data.SqlClient.SqlCommand("Insert INTO personID (firstName,lastName,middleInitial,dateOfBirth,genderCode,subscriberNumber) Values (@firstName,@lastName,@middleInitial,@dateOfBirth,@genderCode,@subscriberNumber)", cnnConnection)Dim cmdCommandIns1 As New System.Data.SqlClient.SqlCommand("Insert INTO registrationID (personID,addressID,email) Values (@personID,@addressID,@email)", cnnConnection)
Dim cmdCommandSelect As New System.Data.SqlClient.SqlDataAdapter("Select person,registration From LakeShore WHERE person=@person AND registration=@registration", cnnConnection)Protected Sub btnReg_OnClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReg.Click
'Open a connection to the "iscorp" Database
cnnConnection.Open()
'Insert Content into personID tablecmdCommandIns.Parameters.Add("@firstName", SqlDbType.VarChar, 40).Value = txbfirstName.Text
cmdCommandIns.Parameters.Add("@lastName", SqlDbType.VarChar, 40).Value = txblastName.TextcmdCommandIns.Parameters.Add("@middleInitial", SqlDbType.Char, 1).Value = txbmiddleInitial.Text
cmdCommandIns.Parameters.Add("@dateOfBirth", SqlDbType.DateTime).Value = txbdateOfBirth.TextcmdCommandIns.Parameters.Add("@genderCode", SqlDbType.Char, 10).Value = ddlgenderCode.SelectedValue
cmdCommandIns.Parameters.Add("@phoneNumber", SqlDbType.VarChar, 20).Value = txbphoneNumber.TextcmdCommandIns.Parameters.Add("@workPhone", SqlDbType.VarChar, 50).Value = txbworkPhone.Text
cmdCommandIns.Parameters.Add("@addressLine1", SqlDbType.VarChar, 40).Value = txbaddressLine1.TextcmdCommandIns.Parameters.Add("@addressLine2", SqlDbType.VarChar, 40).Value = txbaddressLine2.Text
cmdCommandIns.Parameters.Add("@City", SqlDbType.VarChar, 30).Value = txbCity.TextcmdCommandIns.Parameters.Add("@State", SqlDbType.Char, 2).Value = txbState.Text
cmdCommandIns.Parameters.Add("@zipCode", SqlDbType.Int).Value = txbzipCode.TextcmdCommandIns.Parameters.Add("@email", SqlDbType.VarChar, 80).Value = txbemail.Text
cmdCommandIns.ExecuteNonQuery()
cnnConnection.Close()Response.Redirect("http://www.lmcevisits.com/dev/Contact.aspx")
End Sub
End Class
 

View 7 Replies View Related

Execute SQL Task: Error

Feb 18, 2007

I am running a Execute SQL Task which runs a script on a table. It gives me following error:

[Execute SQL Task] Error: There is an invalid number of result bindings returned for the ResultSetType: "ResultSetType_SingleRow".

Thanks,

View 2 Replies View Related







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