Newbie: Error-message Question
May 16, 2006
I got the error message: "The metadata of the following output columns does not match the metadata of the external columns with which the output columns are associated". What does that mean and how am I supposed to fix the problem?
TIA,
Barker
P.S. The SSIS UI seems extremely slow and sluggish (opening, creating connections). Any performance tweaks known? (I have 9GB of RAM on my box and plenty of HD space so I don't think that is it. I also have sql 2005, sp1 installed.)
View 2 Replies
ADVERTISEMENT
Feb 24, 2007
Hi there
I sorry if I have placed this query in the wrong place.
I'm getting to grips with ASP.net 2, slowly but surely!
When i try to access my site which uses a Sql Server 2005 express DB i am receiving the following error:
Server Error in '/jarebu/site1' Application.
Database 'd:hostingmemberasangaApp_DataASPNETDB.mdf' already exists.Could not attach file 'd:hostingmemberjarebusite1App_DataASPNETDB.MDF' as database 'ASPNETDB'.
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: Database 'd:hostingmemberasangaApp_DataASPNETDB.mdf' already exists.Could not attach file 'd:hostingmemberjarebusite1App_DataASPNETDB.MDF' as database 'ASPNETDB'.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:
[SqlException (0x80131904): Database 'd:hostingmemberasangaApp_DataASPNETDB.mdf' already exists.
Could not attach file 'd:hostingmemberjarebusite1App_DataASPNETDB.MDF' as database 'ASPNETDB'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735075
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +41
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
This is the connection string that I am using:
<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|ASPNETDB.MDF;Integrated Security=True;Initial Catalog=ASPNETDB;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
The database is definitly in the folder that the error message relates to.
What I'm finding confusing is that the connection string seems to be finding "aranga"s database.
Is it something daft?
Many thanks.
James
View 1 Replies
View Related
Sep 7, 2007
Hi -
I have an File System Task that copies a file from one directory ot another. When I hard code the target directory (c:dirfile.txt) it works fine. When I change it to a virtual directory (\serverdirfile.txt) I get a security error:
[File System Task] Error: An error occurred with the following error message: "Access to the path '\gracehbtest oS2TMM_Live_Title_000002.xml' is denied.".
Where do I change the security settings?
Thanks - Grace
View 5 Replies
View Related
Aug 18, 2006
I'm trying to use an XML Task to do a simple XSLT operation, but it fails with this error message:
[XML Task] Error: An error occurred with the following error message: "There are multiple root elements. Line 5, position 2.".
The source XML file validates fine and I've successfully used it as the XML Source in a data flow task to load some SQL Server tables. It has very few line breaks, so the first 5 lines are pretty long: almost 4000 characters, including 34 start-tags, 19 end-tags, and 2 empty element tags. Here's the very beginning of it:
<?xml version="1.0" encoding="UTF-8"?>
<ESDU releaselevel="2006-02" createdate="26 May 2006"><package id="1" title="_standard" shorttitle="_standard" filename="pk_stan" supplementdate="01/05/2005" supplementlevel="1"><abstract><![CDATA[This package contains the standard ESDU Series.]]></abstract>
There is only 1 ESDU root element and only 1 package element.
Of course, the XSLT stylesheet is also an XML document in its own right. I specify it directly in the XML Task:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>
<xsl:template name="identity" match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="kw">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:attribute name="ihs_cats_seq" select="position()"/>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Its 5th line is the first xsl:template element.
What is going on here? I do not see multiple root elements in either the XML document or the XSLT stylesheet.
Thanks!
View 5 Replies
View Related
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
Apr 13, 2004
Hi guys,
Your help please.
First off, I have searched the Forum for answers using the keywords and tried those clues first but with no luck. This one for example: http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q282254
I had a copy of MSDE installed on my machine about 12 month ago but never used it so I uninstalled it. Then I downloaded and installed SQL Server 120-day Evaluation edition a few days ago. When I tried to run SQL Server I get
An error 1069 – (The service did not start due to logon failure)…
I’m using Windows XP.
How can I find out what the password is or how can I reset it so the SQL Server logon works?
Any ideas?
Thanks Guys
FB
View 3 Replies
View Related
May 22, 2007
I am getting an error message when I try to print using reporting services: "an error occurred during printing (0x80004005)"
View 4 Replies
View Related
Nov 20, 2006
My apologies...I wasn't for sure where to post an error like this...
Over the last 2 months I have gotten this SQL Server error (twice). All existing processes will continue to work, however no new processes can be created and users cannot connect to the server. This is the exact text of the message in the SQL Server error log.
Operating system error 10038: An operation was attempted on something that is not a socket...
Error: 17059, Severity: 18, State: 0
Error accepting connection request via Net-Library 'SSNETLIB'. Execution continuing.
Error: 17882, Severity: 18, State:
While we can typically just stop SQL Server Service and restart the services...I have found it is best to restart the machine during non-production times to take care of any 'residual' effects of this error.
The SQL Server 2000 SP4 box with Windows 2003 Standard SP1 is well maintained by our I.T. team and it typically will run 4 or 5 months without a reboot.
Thank you...
...cordell...
View 5 Replies
View Related
Feb 5, 2006
Hi, I have developed a website in asp.net 2. I have tester it and it is working fine on my computer but when I have uploaded it to my server I'm getting an error message when the user signup. The error occurs when I'm setting the user role to 'members'.
Error line > Roles.AddUserToRole(user.UserName, "members")
The strage thig is that it is working on my computer but not on the server. My home computer and the server are running the same software versions and the website database is the same as well.
To double check that my code is not generating the error I have lonched 'SQL Query Analizer' and executed the folowing code on my database:
NOTE: In my database I have create the user “teeluk12� and a role “members�
aspnet_UsersInRoles_AddUsersToRoles "/", "teeluk12", "members", "5/02/2006 4:44:33 pm"
Once again the code is working on my home computer but not on the server. On the server I'm getting the following error:
Server: Msg 446, Level 16, State 9, Procedure aspnet_UsersInRoles_AddUsersToRoles, Line 76
Cannot resolve collation conflict for equal to operation.
Does anybody know what could cause the error?
Could it be some permissions that I didn't set on my server?
Thanks for my help and suggestions...
Regards,
Gonzal
View 9 Replies
View Related
Oct 18, 2007
Trying to connect to remote server croaktoad.simpli.biz
I have SQL 2005 Developer on XP SP2 , I have disabled my windows firewall. I can ping to my server (croaktoad.simpli.biz) and i get no error message. My remote connection using both TCP/IP and named pipes are checkeed. My SQL Server Browser is running as well.
However when I try to connect using Managment Studio or running SQLCMD /Scroaktoad. simpli.biz /E I get the following error message
C:sqlcmd /Scroaktoad.simpli.biz /E
HResult 0x52E, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [1326].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired
So I've read all the forums for past 2 days and tried everything, nothing changed Any ideas?
View 4 Replies
View Related
Jun 16, 2007
eh guys ma kind of newbie n tis ... k like wrote a function like
CREATE FUNCTION [dbo].[GetDetailText]
{
@PackingID int,
@PackingType int
}
RETURNS varchar(100)
AS
BEGIN
DECLARE @DetailText varchar(100)
IF (@PackingType = 1)
BEGIN
SET @DetailText = (SELECT
'Tickness' + ':' + CONVERT(varchar, dbo.KF_PackMaterial.thickness) + '' + CONVERT(varchar, KF_Unit_3.Symbol)
+ ',' + 'Width' + ': ' + CONVERT(varchar, dbo.KF_PackMaterial.width) + '' + CONVERT(varchar, KF_Unit_1.Symbol)
+ ',' + 'InnerDia' + ':' + CONVERT(varchar, dbo.KF_PackMaterial.india) + '' + CONVERT(varchar, KF_Unit_5.Symbol)
+ ',' + 'OuterDia' + ':' + CONVERT(varchar, dbo.KF_PackMaterial.outdia) + '' + CONVERT(varchar, KF_Unit_6.Symbol)
+ ',' + 'Recycle' + ':' + CONVERT(varchar, dbo.KF_PackMaterial.recycle) + ', ' + 'Shade' + ':' + CONVERT(varchar, dbo.KF_PackMaterial.shade)
+ ',' + 'Weight' + ':' + CONVERT(varchar, dbo.KF_PackMaterial.weight) + '' + CONVERT(varchar, KF_Unit_4.Symbol)
+ ',' + 'Perforation' + ':' + CONVERT(varchar, dbo.KF_PackMaterial.perforation) + ' (' + CONVERT(varchar, dbo.KF_PackingMaterial.PackingTypeName)
+ ')'
FROM dbo.KF_CartonImageList RIGHT OUTER JOIN
dbo.KF_PackMaterial INNER JOIN
dbo.KF_PackType ON dbo.KF_PackMaterial.type = dbo.KF_PackType.PackID INNER JOIN
dbo.KF_Unit KF_Unit_1 ON dbo.KF_PackMaterial.widthunit = KF_Unit_1.UnitID INNER JOIN
dbo.KF_PackingMaterial ON dbo.KF_PackMaterial.packmaterialid = dbo.KF_PackingMaterial.Packingid LEFT OUTER JOIN
dbo.KF_Color ON dbo.KF_PackMaterial.ColorId = dbo.KF_Color.ColorId LEFT OUTER JOIN
dbo.KF_Unit KF_Unit_6 ON dbo.KF_PackMaterial.outdiaunit = KF_Unit_6.UnitID LEFT OUTER JOIN
dbo.KF_Unit KF_Unit_5 ON dbo.KF_PackMaterial.indiaunit = KF_Unit_5.UnitID LEFT OUTER JOIN
dbo.KF_Unit KF_Unit_4 ON dbo.KF_PackMaterial.weightunit = KF_Unit_4.UnitID LEFT OUTER JOIN
dbo.KF_Unit KF_Unit_3 ON dbo.KF_PackMaterial.thicknessunit = KF_Unit_3.UnitID LEFT OUTER JOIN
dbo.KF_Unit KF_Unit_2 ON dbo.KF_PackMaterial.lengthunit = KF_Unit_2.UnitID LEFT OUTER JOIN
dbo.KF_Unit KF_Unit_7 ON dbo.KF_PackMaterial.heightunit = KF_Unit_7.UnitID ON
dbo.KF_CartonImageList.CDImageId = dbo.KF_PackMaterial.CDImageId
WHERE (dbo.KF_PackMaterial.id=@PackingID AND dbo.KF_PackMaterial.packmaterialid=@PackingType))
END
return @DetailText
END
buts its throwing syntax error like
"[Microsoft][ODBC SQL Server Driver]Syntax error or access violation
"
... ne idea ????????
View 3 Replies
View Related
Oct 10, 2007
where can i find it?
thanks
View 4 Replies
View Related
Dec 20, 2006
Hello,
I have a bundling package that runs about 20 other packages. It has been working fine for a while but a couple of days ago it fail with the following message,
Error 0x800706BE while loading package file "D:PackagesToradSales.dtsx". The remote procedure call failed.
I´m running the SSIS packages in an 64-bit environment.
Thankful for help with this!
//Patrick
View 3 Replies
View Related
Nov 5, 2007
I'm not sure if this is the correct group for this messages, but here it is anyway.
I have a job that has 3 steps to, periodicly the job errors out on Step 1. Following is the message (from Job History).
--------------------
Executed as user: SMIsqladmin. The operation could not be performed because the OLE DB provider 'SQLOLEDB' was unable to begin a distributed transaction. [SQLSTATE 42000] (Error 7391) [SQLSTATE 01000] (Error 7312) OLE DB error trace [OLE/DB Provider 'SQLOLEDB' ITransactionJoin::JoinTransaction returned 0x8004d00a]. [SQLSTATE 01000] (Error 7300). The step failed.
--------------------
Can someone please explain this message, I have no idea how to fix it or what the cause is.
Thanks
David Davis
View 1 Replies
View Related
Mar 30, 2005
I'm struggling with the problem which feels like it shouldn't be taking me this long! Any help would be gratefully received. Simply, there are two tables: Users: userid | username Links: sourceUserId | destUserId sourceUserId and destUserId are both in the users table. I'm trying to write a SP which will output the names of the linked users. eg: Bob | Alice Alice | Geoffrey Peter | Bob Any help gratefully received! Thanks in advance -- Chris
View 2 Replies
View Related
Nov 23, 2004
I've seen this question asked when I searched, but I didn't see an answer that looked like it applied to me, so I'll ask again.....
Making the transition from VB 6 to VB.NET and decided to take a stab at database programming while I'm at it. I bought "Database Programming with Visual Basic.NET and ADO.NET" by Sams Publishing and ran into problems in the first chapter. I've posted some questions on the microsoft.public.vb.database newsgroup and got some help, but it's still not working.
I'll skip some of the boring stuff and dive right in with what I've found out so far:
From MSSQL$VSDOTNETLOGERRORLOG
2004-11-19 02:29:34.71 spid3 SQL global counter collection task is created.
2004-11-19 02:29:34.76 spid3 Warning: override, autoexec procedures skipped.
2004-11-19 02:29:58.87 spid51 Error: 15457, Severity: 0, State: 1
2004-11-19 02:29:58.87 spid51 Configuration option 'allow updates' changed from 0 to 1. Run the RECONFIGURE statement to install..
2004-11-19 02:29:59.01 spid51 Error: 15457, Severity: 0, State: 1
2004-11-19 02:29:59.01 spid51 Configuration option 'allow updates' changed from 1 to 0. Run the RECONFIGURE statement to install..
2004-11-19 02:29:59.46 spid3 SQL Server is terminating due to 'stop' request from Service Control Manager.
The last suggestion was to uninstall and reinstall. I uninstalled VS and SQL and reinstalled getting the same error message in the log, but the message box said that installation was complete.
On the Server Explorer of the IDE, it shows my computers name (programmer) under Servers. When I expand that and expand SQL Servers, I see PROGRAMMERVSDOTNET. When I try to expand that, I get the SQL Server Login window with Server textbox disabled saying PROGRAMMERVSDOTNET and the Database blank. Under the Login it has James (my sign in name) and asks for a password. When I did the MS-DOS CLI installation, I used "password" as the SAPWD. I tried using password, and tried using the password to log on as James, and get the same error message: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
Any help would be appreciated, as long as you remember that I am a COMPLETE newbie at this. I'm fairly computer literate, but I don't know the first thing about databases.....
Thanks again,
James
View 3 Replies
View Related
Aug 16, 2006
Hello,
I am admittedly new to this, especially sql server and am in need of a pro's assistance.. I installed Microsoft Small Business accounting, which in turn installed and configured a sql server. When I installed ACT! 2005 (v7.0) and tried to create a database, it states that it cannot find the master file.... so I tried to install sql server from Microsofts site - downloaded all the packages, unzipped them and ran them... the error I get is that the sql server needs to have an sa password and to use some switch to change it... for the life of me I am lost here. I can't use ACT! at this point and I have not ideas of how to remove, reinstall or repair the sql server.... Any help you can provide would be greatly appreicated!
View 9 Replies
View Related
May 4, 2007
I'm getting the following msg.
Server: Msg 9002, Level 17, State 2, Procedure spPFW_Get_Financial_Data, Line 145
[Microsoft][ODBC SQL Server Driver][SQL Server]The log file for database 'tempdb' is full. Back up the transaction log for the database to free up some log space.
When I use the tools/backup database it will not let me select backup transaction log or fails the bacup of the tempdb database with a msg saying : 'Backup and restore operations are not allowed on database tempdb'
What should I do?
View 5 Replies
View Related
Sep 27, 2007
hy.
i am a newbie to SQL
i downloaded and installed SQL SERVER 2005 EXPRESS.
i tried to convert an "ACCESS" database to sql and got the next error:
: "AN ERROR OCCURED
WHILE ESTABLIDHING A CONNECTION TO THE SERVER. WHEN CONNECTING TO SQL 2005,
THIS FALIURE MAY BE COUSED BY THE FACT THAT UNDER THE DEFAULT SETTINGS SQL
SERVER DOES NOT ALLOW REMOTE CONNECTIONS. PROVIDOR NAMED PIPES ERROR 40 -
COULD NOT OPEN A CONNECTION TO SQL SERVER".
any help apreaciated.
View 1 Replies
View Related
Dec 30, 2003
I've been looking over this and can't see anything wrong. Can anyone shed some light on this for me?
------------------
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0117: 'System.Data.SqlClient.SqlConnection' does not contain a definition for 'ExecuteReader'
Source Error:
Line 16: SqlCommand myComm = new SqlCommand("SELECT users, password FROM users WHERE username='" + username + "' AND password='" + password + "'", myConn);
Line 17: myConn.Open();
Line 18: SqlDataReader myReader = myConn.ExecuteReader();
Line 19: do
Line 20: {
Source File: D:Inetpubhoteladvisor estLogin.aspx Line: 18
void Login(string username, string password)
{
SqlConnection myConn = new SqlConnection ("server = client1; uid = dbadmin; pwd = dbadmin; database = hotels");
SqlCommand myComm = new SqlCommand("SELECT users, password FROM users WHERE username='" + username + "' AND password='" + password + "'", myConn);
myConn.Open();
SqlDataReader myReader = myConn.ExecuteReader();
do
{
while (reader.Read())
{
if (username == myReader.GetString(1) && password == myReader.GetString(2))
{
messages.Text = "Your login was successful!";
}
else
{
messages.Text = " Your login was unsuccessful!";
}
}
}
while (reader.NextResult());
myReader.Close();
myConn.Close();
}
void Submit_Click(Object sender, EventArgs e)
{
Login(username.Text, password.Text);
}
Edit by moderator - NetProfit: Added < code>< /code> tags.
View 7 Replies
View Related
Oct 19, 2007
I have a SQL Express database on our server that is used for one of our websites when the website tries to write to the database I get the following error: -
An attempt to attach an auto-named database for file D:lahwebsitesGiants North Walesapp_datadatabase.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
This error is very frustrating and I really can't find a way around it. I have done the following: -
Deleted the SQL Server Express folders under user preferences
View 3 Replies
View Related
Feb 29, 2008
Hi,I am trying to write some C# ASP.NET 2.0 code. I have created a web form to send data to my sql server 2005 database. When I compile the application and insert data then click on the submit button I get this error
"A first chance exception of type
'System.Data.SqlClient.SqlException' occurred in System.Data.dll" I have been trying to solve this for a few days now with no luck, so any help would be appreciated. I'll post below the source code of the web form (addOrder.aspx). It might be worth mentioning that I have created another web form in the same project called addCustomer.aspx. Like addOrder.aspx it is a web form, however it successfully inserts data in the database. 1 <%@ Page Language="C#" MasterPageFile="~/Default.master" Title="Add Order Page" %>
2 <%@ import namespace="System.Data.SqlClient" %>
3 <%@ Import Namespace="System.Data" %>
4 <%@ Import Namespace="System.Web" %>
5 <%@ Import Namespace="System.Configuration"%>
6 <%@ Import Namespace="System.Globalization"%>
7
8 <script runat="server">
9
10 protected void Page_Load(object sender, EventArgs e)
11 {
12
13 }
14
15 protected void sumbitButton_Click(object sender, EventArgs e)
16 {
17 SqlConnection conn;
18 SqlCommand comm;
19 string connectionString =
20 ConfigurationManager.ConnectionStrings[
21 "ShippingSystemConnectionString1"].ConnectionString;
22 conn = new SqlConnection(connectionString);
23 comm = new SqlCommand(
24 "INSERT INTO Order(CustomerID, " +
25 "NumberofItems, DescriptionsofItems, SafeItems) " +
26 "VALUES (@CustomerID, " +
27 "@NumberofItems, @DescriptionsofItems, @SafeItems)", conn);
28 comm.Parameters.Add("@CustomerID", System.Data.SqlDbType.Int);
29 comm.Parameters["@CustomerID"].Value = int.Parse(DropDownList1.SelectedValue);
30 comm.Parameters.Add("@NumberofItems", System.Data.SqlDbType.Int);
31 comm.Parameters["@NumberofItems"].Value = numofitemstxt.Text;
32 comm.Parameters.Add("@DescriptionsofItems", System.Data.SqlDbType.VarChar);
33 comm.Parameters["@DescriptionsofITems"].Value = descofitemstxt.Text;
34 comm.Parameters.Add("@SafeItems", System.Data.SqlDbType.VarChar);
35 comm.Parameters["@SafeItems"].Value = safetxt.Text;
36 try
37 {
38 conn.Open();
39 comm.ExecuteNonQuery();
40 Response.Redirect("Success.aspx");
41 }
42 catch
43 {
44 }
45 finally
46 {
47 conn.Close();
48 }
49 }
50
51
52
53 protected void CustomerIDList_SelectedIndexChanged(object sender, EventArgs e)
54 {
55
56 }
57 </script>
58
59 <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
60 <table style="position: static">
61 <tr>
62 <td style="width: 169px">
63 Customer ID:</td>
64 <td style="width: 100px">
65 <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1"
66 DataTextField="CustomerID" DataValueField="CustomerID" Style="position: static">
67 </asp:DropDownList><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ShippingSystemConnectionString1 %>"
68 SelectCommand="SELECT [CustomerID] FROM [Customer]"></asp:SqlDataSource>
69 </td>
70 <td style="width: 178px">
71 </td>
72 </tr>
73 <tr>
74 <td style="width: 169px">
75 Number of Items:</td>
76 <td style="width: 100px">
77 <asp:TextBox ID="numofitemstxt" runat="server" Style="position: static"></asp:TextBox></td>
78 <td style="width: 178px">
79 <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="numofitemstxt"
80 ErrorMessage="Number of Items Required" Style="position: static"></asp:RequiredFieldValidator></td>
81 </tr>
82 <tr>
83 <td style="width: 169px">
84 Descriptions of Items:</td>
85 <td style="width: 100px">
86 <asp:TextBox ID="descofitemstxt" runat="server" Style="position: static"></asp:TextBox></td>
87 <td style="width: 178px">
88 <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="descofitemstxt"
89 ErrorMessage="Description Required" Style="position: static"></asp:RequiredFieldValidator></td>
90 </tr>
91 <tr>
92 <td style="width: 169px">
93 Are Items safe:</td>
94 <td style="width: 100px">
95 <asp:TextBox ID="safetxt" runat="server" Style="position: static"></asp:TextBox></td>
96 <td style="width: 178px">
97 <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="safetxt"
98 ErrorMessage="Are Items Safe?" Style="position: static"></asp:RequiredFieldValidator></td>
99 </tr>
100 <tr>
101 <td style="width: 169px">
102 <asp:ValidationSummary ID="ValidationSummary1" runat="server" Style="position: static" />
103 </td>
104 <td style="width: 100px">
105 <asp:Button ID="sumbitButton" runat="server" OnClick="sumbitButton_Click" Style="position: static"
106 Text="Submit" /></td>
107 <td style="width: 178px">
108 </td>
109 </tr>
110 </table>
111 </asp:Content>
112
113
My order table in SQL server 2005 (express) looks like this:
View 5 Replies
View Related
Jan 27, 2004
Hello-
I have the following sql statement which produced an error when I add the order by clause
SQL = "SELECT DISTINCT nc_department.department, Count(nonconformance.department_id) as 'events', ISNULL(SUM(nonconformance.nc_wafer_qty),0) as wafers FROM nc_department LEFT OUTER JOIN nonconformance ON nc_department.department_id = nonconformance.department_id WHERE nc_department.active = '1' GROUP BY nc_department.department ORDER by nc_department.order_id"
This is the error I get:
ORDER BY items must appear in the select list if SELECT DISTINCT is specified.
Any help appreciated
View 10 Replies
View Related
Apr 23, 2004
I'm catching a primary constraint error in SQL and don't want to return the SQL error message back to the client. Is there any way to stop this. Thankyou
View 5 Replies
View Related
May 21, 2004
I need help on this!
When I try to change the data from a table using Web Matrix, then I get this error message.
The table’s data cannot be edited because the table does not contain modifiable columns.
As I need to edit the data’s, how can I solve this?
Thanks for Your Help
Mikel
View 1 Replies
View Related
Sep 8, 2004
I finally installed MSDE and have the icon in my tray at the bottom of the screen.
When I try to connect to a database using the wizard in the web matrix program I get this message:
Unable to connect
SQL Server does not exist of access denied
Connection Open (Connect ())
What might be wrong??
Thanks for your help I'll get it soon (I hope)
Del Dobbs
View 2 Replies
View Related
Dec 17, 2004
HI FRIENDS
WHEN I TRY TO RUN A PROGRAM WHICH BINDS A DATAGRID CONTROL TO A SQL SERVER TABLE I GET A ERROR MESSAGE LIKE [SQL EXECEPTION LOGIN FAILED FOR HOMECOMPUTER/ASPNET] . IF U KNOW WHAT MIGHT COZ THE PROBLEM PLEASE TELL ME.
IAM RUNNING THE MICROSOFT SQL SERVER FORM MY HOME COMPUTER I.E (LOCAL) . IS THERE SOME SETTINGS THAT I NEED TO DO BEFORE RUNNING A PAGE WHICH CONNECTS TO THE SQL SERVER.
View 2 Replies
View Related
Jun 13, 2006
I am trying to set a text field as the primary key for a SQL SERVER Express 2005 Database in Visual Studio. I used the following Command:ALTER TABLE Tablename ADD PRIMARY KEY (fieldname);where you substitute table name and fieldname for the appropriate fields. The error message I am getting is:SQL Execution Error.Executed SQL statement: ALTER TABLE Lake ADD PRIMARY KEY(wbic);Error Source .Net SqlClient Data ProviderError Message: Column 'wbic' in table Lake is of a type that is invalid for use as a primary key column or index.Could not create constraint. See previous errors.How can I fix this so any type of field can be a primary key?
View 7 Replies
View Related
Feb 7, 2002
I am extracting data out of Lotus Notes into an Oracle DB using EM.
I keep getting an error "[Lotus][ODBC Lotus Notes] Data value is not a valid date, time or timestamp" I went ahead and dropped the destination table, and changed all of the "date" columns to varchar's, redefined the transformation, and executed package again, but still get the error. Any ideas?
Thanks!
BV
View 1 Replies
View Related
Jun 20, 2001
Has anyone seen these error messages.....
17066: SQL Server Assertion: File: <proc.c>, line=1927
Failed Assertion = 'm_activeSdesList.Head () == NULL'.
and
1203, Severity: 20 State: 1
Process ID 8 attempting to unlock unowned resource KEY:
7:1402200252:6 (f80117756d42).
View 2 Replies
View Related
Oct 18, 2001
I am running across this error message: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Has anyone seen this before? Can you perform a fetch or do a loop? I am kind of new at sql and not really sure how either of these work or how to start to code something like that.
Thanks!
Terry
View 2 Replies
View Related
Oct 26, 2000
When I ran below stored procedure, I got error message.
create procedure pro_log
as
declare@Execution_String varchar(255),
@logfilevarchar(112)
select@logfile = 'server_name(F:)folder_namelog_name'+convert(varc har(8),getdate(),112)+'.log'
Select @Execution_String = '(F):Mssql7Binnisql -S server_name -U user_name -P password -d datebase_name -q"procedure_name" > ' + @logfile
Print @Execution_String
Execute master..xp_cmdshell @Execution_String
return
GO
exec pro_log
************************************************** *************************
Mssql7Binnisql was unexpected at this time.
(1 row(s) affected)
************************************************** *************************
Any body can please tell me what is meant by above error message?
View 5 Replies
View Related
Jan 10, 2001
I am running a program on SQL 6.5 server and I am getting this error message:
Can't allocate space for object '-451' in database 'tempdb' because the 'system' segment is full. If you ran out of space in Syslogs, dump the transaction log. Otherwise, use ALTER DATABASE or sp_extendsegment to increase the size of the segment. Sort failed: Out of space or locks in database 'tempdb'
Can somebody help me resolve this error message? Thanks a lot
Isabel
View 1 Replies
View Related