Click Through Error - An Item With The Same Key Has Already Been Added - When/Why?
Jul 10, 2007
I am getting this error when clicking-through in Report Builder on a report using a report model as the data source -
An item with the same key has already been added.
I searched for the error but came up empty in the SSRS space. Does anyone out there know when this is generated and where I need to look in my model/properties to see what I have set incorrectly?
A little background/detail - It's a simple report against two fields (type & #count) in one entity (customer) in a (guessing here) medium sized model (~16 transactional/fact entities, ~40 lookup entities, ~15 what I am calling domain entities). The entity has 5 DefaultDetailAttributes, one Identifying. The report has 2 fields type (a lookup role) and #customers in the data area (so I can click it to test the click through). Then I click the # Customers to look at the detail for those X customers and after a long while and no queries against the DB (I have profiler running) I get this error.
Thanks in advance for the help.
View 1 Replies
ADVERTISEMENT
Jun 1, 2004
Hi there,
I have a search page that redirects to another page transfering the search terms in a querystring. In the page to display the search results I use SQL parameters to show the results. Everything runs fine until I do a page refresh or use paging to bring up another set of results.
Everytime I try to refresh/page etc. I get the following error:
Item has already been added. Key in dictionary: "@CityTown" Key being added: "@CityTown"
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.ArgumentException: Item has already been added. Key in dictionary: "@CityTown" Key being added: "@CityTown"
Source Error:
Line 20:
Line 21: 'Creates parameters for the WHERE statement taking the querystring contents from previous page
Line 22: dsPropertyListing.Parameters.Add("@CityTown", CityTown)
Line 23: dsPropertyListing.Parameters.Add("@Suburb", Suburb)
Line 24: dsPropertyListing.Parameters.Add("@Rooms", Rooms)
Source File: K:detailsdetailspropertylisting.aspx Line: 22
Stack Trace:
[ArgumentException: Item has already been added. Key in dictionary: "@CityTown" Key being added: "@CityTown"]
System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) +931
System.Collections.Hashtable.Add(Object key, Object value) +11
ASP.detailspropertylisting_aspx.Page_Load(Object sender, EventArgs e) in K:detailsdetailspropertylisting.aspx:22
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +55
System.Web.UI.Control.LoadRecursive() +27
System.Web.UI.Page.ProcessRequestMain() +731
Any sugestions that anyone could provide would be greatly appreciated. This error obviously renders the search features useless.
Thanks in anticipation,
TCM
View 3 Replies
View Related
Dec 14, 2004
Not 100% sure how to do this so I would appreciate some directions. I have 2 tables, Systems and Contacts. A system can have 1 to infinite contacts and contact can have 1 to infinite systems. So I use a 3rd table Sys_Con to add the contact needed for each system.
Now my question is once I add the System and contact how do I know for sure which ContactID to add in my Sys_Con table? Because while I am doing this operation maybe someone can add an other contact. So is there a way for my store proc Add_Contact to return the contactID needed for my store proc Add_Sys_Con ?
TABLE Sys_Con
SystemID int
ContactID int
Table Contact
ContactID int Identity
ContactName
...
Table System
SystemID
...
View 3 Replies
View Related
Jun 6, 2007
I am developing a small project that converts a dataset to an equivalent structure in SqlCe. The application converts every field, table and constraints to SqlCe, decomposing de dataset structure into Sql sentences.
The application works fine, the tables and constraints are reconstructed without error. but I found some issues:
After conversion, the usual test is to connect to SqlCe, using Data->Add New Data Source and generate a dataset from the resulting tables.
I found that some tables throw the following message:
Failed to add relation(s).An item with the same key has already been added.
After that, the dataset returned contains the tables, but not the relations.
After some trial I found that Data Source Configuration Wizard (DSCW) has some problem with foreign keys using Primary keys with multiple fields. If I drop that foreign keys, DSCW inferes the dataset without problem.
Interesting note: I am able to convert the dataset to an Sql Server using the same Sql sentences. If I use Data Source Configuration Wizard I have no errors.
Any advise to understand of fix this problem will be aprecciated.
Is that a bug from DSCW ?
Thanks
Fernando
View 2 Replies
View Related
Apr 23, 2008
Hi Team Expert,
I am working on an ASP.NET and c# project. I am creating a page that allow user to add new Workitem to TFS and successfully do so. Now I would like to implement the way to email to notify the user that the new WI is added €¦. Does anyone know how to do this or have an example of how to implement that.
Any help would be greatly appreciated.
Thanks so much
Ddee
View 1 Replies
View Related
Feb 1, 2008
the line in bold..can sumone tell me how to correct the error , it say syntax error beside "="
Imports System.Data
Imports System.Data.SqlClient
Partial Class Default3
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub btnlogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnlogin.Click
Dim conn As New SqlConnection _
("data source =YOUR-KEGKZI6IFCSQLEXPRESS; integrated security=true;"
& _
"initial catalog=LOGINPAGE")
conn.Open()
Dim cmdLogin As New
SqlCommand("select * from UserName where ='" & txtusername.Text
& "' and Password='" & txtpassword.Text & "'", conn)
Dim dr As SqlDataReader
dr =cmdLogin.ExecuteReader()
If dr.Read() Then
Response.Redirect("Galery.aspx")
Else
Response.Redirect("homepage.aspx")
End If
View 1 Replies
View Related
Dec 6, 2013
I have a BOM table with all finished item receipes and semi items recipes. create a query where semi item materials are also listed in finished item recipe.
View 5 Replies
View Related
Aug 7, 2006
When setting an output's "IsErrorOut" property to true, is it also possible to add additional columns to that error output?
I'd like to add a message beyond the standard errorCode and errorColumn columns, a column which is the "specific error message", not just a lookup on the errorCode.
IDTSOutput90 outError = ComponentMetaData.OutputCollection.New();
outError.Name = "Error Output";
outError.IsErrorOut = true;
// Add extra column here, e.g. ErrorMessage
View 7 Replies
View Related
Mar 6, 2007
Hi,
Here's my problem. I have 2 tasks defined in my Control Flow tab:
EXECUTE SQL--------->EXECUTE DTS 2000 PACKAGE
When I attempt to run it, by right-clicking the EXECUTE SQL task, and selecting "Execute Task", it only runs the EXECUTE SQL part (successfully), and does not "kick off" the EXECUTE DTS 2000 PACKAGE, after it is done running (even though it completes successfully, as shown by the green box).
Yes, they are connected by a dark green arrow, as indicated in my diagram above.
Why is this?? Am I missing something here? Need help.
THANKS
View 3 Replies
View Related
Feb 2, 2008
hello it seems lack of c# skills is getting the better of me here...iv been trying to get this to work for hours now without success. I have just started working in c# so i am a beginner :)
all i want to do it query the database, check to see if a title exists, if yes then populate textbox saying 'title in use' but if the title doesnt exists then continue executing rest of code to add the title.
You'll notice iv tried to use string variables and sqlDataAdapter but i cant get these to work either...please help
so far i have this that keeps giving me the error that my button click is undefined: protected void bookButton_Click(object sender, EventArgs e){
//string title;try{SqlConnection conn1 = new SqlConnection();
conn1.ConnectionString =
"Data Source=Gemma-PC\SQLEXPRESS;" +"Initial Catalog=SoSym;" +
"Integrated Security=SSPI;";SqlCommand findTitle = new SqlCommand("SELECT title FROM Publication WHERE title='" + titleTextBox.Text + "';", conn1);
conn1.Open();
findTitle.ExecuteNonQuery();
/*
DataSet myDataSetTitle = new DataSet("PublicationTitle");
myDataSetTitle.Clear();
myDataAdapterTitle.Fill(myDataSetTitle);//myDataSet contains results from above SELECT statement
title = myDataSetTitle.Tables[0].Rows[0]["title"].ToString();*/
}catch(Exception ex)
{TitleInvalidMessage.Text = "Title Not Accepted: This title is already in use by another publication" +ex.Message;
}
//title does not exist in table so continue and add to database
//rest of code here
View 5 Replies
View Related
Sep 18, 2006
When I try to run my application using VWD from the file system I can connect and run the application and it connects to the remote SQL 2000 server with no problem.However, when I publish to my web server I get the folloiwng error message: Anyone got any ideas?? Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: The entry 'MCLConnectionString' has already been added.Source Error: Line 11: <appSettings/>
Line 12: <connectionStrings>
Line 13: <add name="MCLConnectionString" connectionString="Data Source=GEACO1INTR1;Initial Catalog=MCL;Persist Security Info=True;User ID=ASPNET;Password=PAUL0001" providerName="System.Data.SqlClient"/>
Line 14: </connectionStrings>
Line 15: <system.web>Source File: c:inetpubwwwrootmcltestweb.config Line: 13
View 4 Replies
View Related
Jul 12, 2007
Hello,Basically, I have a table with 2 fieldsId item#1 33332 33333 22224 22225 22226 33337 33338 3333I would like to only select the last identical Item# which in this case would be the id 6,7 and 8Any idea how could I do that?Thanks
View 1 Replies
View Related
Mar 26, 2008
Hi,
I'm trying to copy and paste an 'Execute SQL Tasks' within one of my packages.
I've managed to solve the copy part of the problem by registering the following dlls:
regsvr32.exe msxml3.dll
regsvr32.exe msxml6.dll
However, I can't paste the copied task onto my control flow. When I paste I get the following error:
The designer could not paste one or more executables.
Additional information:
At least one executable could not be pasted correctly.
the executable with the name 'Record Row Count' could not be pasted successfully.
Information about the state of the executable with the name
'Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask, Microsoft.SqlServer.SQLTask,
Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' could not be loaded from the clipboard.
Exception from HRESULT: 0xC0010028 (Microsoft.DataTransformationServices.Design)
Any help getting this fixed would be appreciated.
Tom
View 5 Replies
View Related
May 22, 2008
While building Report Model Solution in Business Intelligent Studio i am getting following errror-
More than one item in the Entity 'table' has the name 'columns'. Item names must be unique among immediate siblings.
Please advice how to resolve this one.
Thanks
Ashwin.
View 1 Replies
View Related
Jan 18, 2007
hi everyone
what the matrix's class name ?
where is the matrix's dll?
Can i create a new class extends the matrix?
I want to override the matrix's onpaint method.
Can i do this ?
why the table not have the column group?
View 9 Replies
View Related
Jan 31, 2007
Hi,
I am using ATL COM library application. It is using sql data base for fetching the records. Some times, i get the following error. could you please let me know, why this happens? This is not reproduceble every time.
(Error! hr=80040e21, hrDesc=Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work
Here is the code to connect to database which i am using.
CDataSource db;
CDBPropSet dbinit(DBPROPSET_DBINIT);
dbinit.AddProperty(DBPROP_AUTH_INTEGRATED, OLESTR("SSPI"));
dbinit.AddProperty(DBPROP_INIT_CATALOG, (const char *)bDatabase);
dbinit.AddProperty(DBPROP_INIT_DATASOURCE, (const char *)bServer);
dbinit.AddProperty(DBPROP_INIT_LCID, (long)1033);
dbinit.AddProperty(DBPROP_INIT_PROMPT, (short)4);
dbinit.AddProperty(DBPROP_INIT_TIMEOUT, (short)150);
hr = db.Open(_T("SQLOLEDB.1"), &dbinit);
if (FatalError(hr, "db.Open", buf))
{
*iErrorCode = hr;
return S_OK;
}
Any help, appreciated.
Thanks,
Satish
View 1 Replies
View Related
May 14, 2007
Hi
I have a old report that was pointing to a different database, and i changed the connection string for that report and changed the field names (As per my new stored Procedure). In some places I keep getting this run time error, i have tried looking for all the hidden references to this field and i cannot find any parameter that the old database had. The error messages that i get are as follows:
[rsFieldReference] The Hidden expression for the table €˜tblContactInfo€™ refers to the field €˜PL_Admin_ShowInKit€™. Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope.
[rsFieldReference] The Hidden expression for the table €˜tblContactInfo€™ refers to the field €˜PL_FA_ShowInKit€™. Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope.
[rsFieldReference] The Hidden expression for the table €˜tblWithdrawals€™ refers to the field €˜PW_Comment€™. Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope.
Can Someone please help me out as to how should i get rid of these error messages, they are kinda driving me nuts.
Regards,
Karen
View 3 Replies
View Related
Oct 16, 2014
I am having trouble finishing the last bit of a report. The report shows orders that customers have placed that contain 0 promo items, All promo items (all items in order are promo items), and a mix of promo and non promo (at least 1 promo item and 1 non-promo item). Ive simplified this a bit for ease of understanding but lets assume we have 2 tables: A Promo table that contains the items on promotion and the dates that promotion is valid, and a Sales table, that contains the order number, order date, and sku ordered.
I've already written code that finds orders that have at least 1 promo item in them, and using that, I can determine what orders have 0 promo items in them. Where I am stuck is taking the orders that have at least 1 promo item in them, and separating them into orders that have only promo items, and those that have both promo and not promo items in them. Also, there are several promos throughout the year (called "Offers") so in my code below, you can see 2 different Offers ("JF" and "MA") with their corresponding dates they are valid. They will never overlap. My results also have to be split out by Offer so management can look at the results of each offer separately. Here is some code:
Code:
create table #Promos (
Offer varchar(2) null,
SKU int null,
StartDt date null,
EndDt date null
[Code] ....
So my results should show OrderNo A1111 in the Promo and No Promo group because of SKU 5 not being promotional during the time that order was placed. OrderNo A2222 should be in the Promo Only group because both SKUs on the order were promotional at the time the order was placed.
View 6 Replies
View Related
Feb 2, 2007
I've set up DB mail and sent a test e-mail and that comes through fine.
I set up an Operator with email Name: DWhelpton@k-and-s.com;MWeaver@k-and-s.com
I created a job and set up the notifications to e-mail the operator on failure.
When the job runs and fails, I do not get an e-mail and I get the following exception in the db mail log:
Date 2/2/2007 8:35:00 AM
Log Database Mail (Database Mail Log)
Log ID 402
Process ID 3936
Last Modified 2/2/2007 8:35:00 AM
Last Modified By NT AUTHORITYSYSTEM
Message
1) Exception Information
===================
Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException
Message: Could not retrieve item from the queue.
Data: System.Collections.ListDictionaryInternal
TargetSite: Microsoft.SqlServer.Management.SqlIMail.Server.Controller.ICommand CreateSendMailCommand(Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DBSession)
HelpLink: NULL
Source: DatabaseMailEngine
StackTrace Information
===================
at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandFactory.CreateSendMailCommand(DBSession dbSession)
at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandFactory.CreateCommand(DBSession dbSession)
at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandRunner.Run(DBSession db)
at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.ThreadCallBack.MailOperation(Object o)
What step am I missing?
View 1 Replies
View Related
Jul 5, 2007
Hello,
I am getting the following error from my SqlClr proc. I am using a third party API, which is making call to some webservice.
System.InvalidOperationException: There is an error in XML document (11, 2). ---> System.ArgumentException: Item has already been added. Key in dictionary: 'urn:iControl:Common.ULong64' Key being added: 'urn:iControl:Common.ULong64'
System.ArgumentException:
at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at System.Xml.Serialization.XmlSerializationReader.AddReadCallback(String name, String ns, Type type, XmlSerializationReadCallback read)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.InitCallbacks()
at System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement(String name, String ns, Boolean elementCanBeType, String& fixupReference)
at System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement(String name, String ns, String& fixupReference)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read5926_get_failover_stateResponse()
at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer8221.Deserialize(XmlSerializationReader reader)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, Xml
...
System.InvalidOperationException:
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at iControl.SystemFailover.get_failover_state()
at F5CacheManager.GetActiveLBIPaddress()
Found a similar problem in a different thread, but couldn't find any solution. I was wondering if there is an open case for this issue?
https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=398142&SiteID=1
View 4 Replies
View Related
Dec 27, 2006
Hi,
I have a situation where a tab limited text file is used to populate a sql server table.
The tab limited text file comes from a third party vendor. There are fixed number of columns we need to export to the sql server table. However the third party may add colums in the text file. Whenenver the text file has an added column (which we dont need to import) the build fails since the flat file connection manager does not create the metadata for it again. The problem goes away where I press the button "Reset Columns" since it builds the metadata then. Since we need to build the tables everyday we cannot automate it using SSIS because the metadata does not change automatically. Is there a way out in SSIS?
View 5 Replies
View Related
May 22, 2006
Hi,
I have set of 2 DTS packages, one of which calls the other by forming a command-line (dtexec) using a Execute Process task.
From the parent package-> Execute Process Task->
dtsexec /F etc... /<pkg variable> = "servername"
Each of the parent and the called package have a variable: "User::DWServerSQLInstance" which is mapped to the SQL server connection manager server name property using an expression. The outer package has the above variable and so does the inner called package (which gets assigned through the command line from the outerpackage call to inner)
I "sometimes" get the following error:
OnError,I4,TESTDOMAdministrator,ACDWAggregation,{A1F8E43F-15F1-4685-8C18-6866AB31E62B},{77B2F3C7-6756-46EB-8C01-D880598FB4B3},5/22/2006 5:10:28 PM,5/22/2006 5:10:28 PM,-1073659822,0x,The variable "User::DWServerSQLInstance" is already on the read list. A variable may only be added once to either the read lock list or the write lock list.
Help would be appreciated!
I have seen other posts on this but, not able to relate the solution to my scenario.
View 9 Replies
View Related
Mar 7, 2008
Hey Guys,
I'm not sure if anyone can help me with this but I am trying to achieve the following:
I have a row (In this case it is information on a fix) and on a button click I am trying to get it to "archive" it. At the moment I have it so that it it takes the current information and adds it to the archive table adding an archive date. The thing that I am struggling with is incrementing the version number. So, I need it to (in these steps I think) - Look for existance of the other entires of that ID, look for the version number that is related to the newest date of those knowledgeIDs and then add 1 to it. If that knowledgeID doesnt exist then add it as one.
My current code is below:
Thanks in Advance =)
C# Codeprotected void Page_Load(object sender, EventArgs e)
{UserName = (string)Session["UserName"];
Label4.Text = UserName + " Is Current Logged In";UserType = (string)Session["UserType"];if ((Session["UserName"] != null) & (UserType == "Helpdesk"))
{Response.Redirect("Accessrights.aspx");
}else if (Session["UserName"] == null)
{Response.Redirect("Login.aspx");
}
FixName = "default";Description = "default";File = "default";
ADate = myCalendar.TodaysDate.ToShortDateString();
AddDate = Convert.ToDateTime(ADate);myConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\inetpub\wwwroot\HOF\App_Data\HOF.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True;";
}protected void Button1_Click(object sender, EventArgs e)
{SqlConnection myConnection = new SqlConnection(myConnectionString);
try
{
FixName = TextBox1.Text;
SqlCommand myCommand = new SqlCommand("select * from Knowledge WHERE FixName like '%" + FixName + "%'", myConnection);
myConnection.Open();SqlDataReader myReader = myCommand.ExecuteReader();if (myReader.HasRows)
{while (myReader.Read())
{
TextBox1.Text = myReader["FixName"].ToString();TextBox2.Text = myReader["Description"].ToString();
File = myReader["Location"].ToString();if (File != null)
{
TextBox3.Text = File;
}
else
{TextBox3.Text = "There is no script avaliable";
}KnowledgeID = myReader["KnowledgeID"].ToString();Add = myReader["DateAdded"].ToString();
}
myConnection.Close();
}
else
{TextBox1.Text = FixName + "Does not Exist. Please try again.";
}
}catch (Exception ex)
{
myConnection.Close();
}
try
Description = TextBox2.Text;File = Convert.ToString(FileUpload1.FileName);if (CheckBox1.Checked == true)
{SAPPS = "True";
}
else
{SAPPS = "False";
}
{SqlCommand mycommand2 = new SqlCommand("INSERT INTO Knowledge (FixName, Description, Location, DateAdded, DateArchived, Version, KnowledgeID) SET ('" + FixName + "','" + Description + "','" + File + "','" + Add + "','"+AddDate+"','" + SAPPS + "','"+I NEED A VALUE HERE+"','"+KnowledgeID+"')", myConnection);SqlDataAdapter myDataAdapter = new SqlDataAdapter(mycommand2);
sa = mycommand.ExecuteNonQuery();
myConnection.Close();
}catch (Exception ex)
{
myConnection.Close();
}
}
View 2 Replies
View Related
Jan 11, 2005
Running SQL2000 SP3.
We installed an application named Streamserve. Now, if I go into Enterprise Manager I can expand the databases fine. But when I try to right-click properties Enterprise Manager goes bye bye. No error messages. I tried this on master and same thing. I currently have 2 different machines - a dev and a QA box and both are behaving badly.
Any ideas?
Thanks
Sharon
View 4 Replies
View Related
Mar 19, 2007
i have a DTS Package a saved when i set up the package. it's in local packages in Enterprise Manager now. is there any way i can simply set up a shortcut on my desktop to execute that DTS, rather then having to nav though Enterprise Manager?
yeah, i know i'm lazy :o)
View 2 Replies
View Related
Oct 15, 2007
Hi everyone, Im using SSRS 2000 and I was wondering is there a way to create a click button??? I have 2 reports linked with hyperlinks but I wanted to make it look more presentable. So, instead of just clicking on the words, I want them to click the button.
Thanks in advance,
Abner
View 3 Replies
View Related
Dec 25, 2007
I feel like it must be easy and I'm missing something. Maybe I'm going the wrong way about it too. Basically I've written an append query that needs parameters, but I have no idea how to actually execute it. I'm coming from building apps in MS Access where all of this is really easy. I'm really enjoying learning some things, and did my first MS SQL trigger event tonight, which worked great. I though using a trigger may be an option here, but I need to control the "when" of this append a little more carefully and can't rely on an automated event. I can manually execute the query and it works, but have a button I could press on a form, with the queries on that form would be ideal. I'm basically moving partial data from one table to another. Any help? Again, this seems like it "should" be easy, but I'm not finding info on it. Please talk slowly, as again, I'm coming from Access.
View 5 Replies
View Related
Mar 7, 2008
My database isn't getting updated. You see any problem with this code?
string strConnection = ConfigurationManager.ConnectionStrings["ShippingConnectionString"].ConnectionString;
SqlConnection myConnection = new SqlConnection(strConnection);String updateCmd = "UPDATE [response] SET [sitename]=@sitename, [sitephone]=@sitephone, [siteemail]=@siteemail, [siteaddress]=@siteaddress, [cra_name]=@cra_name WHERE [responseID]=@responseID";
SqlCommand myCommand = new SqlCommand(updateCmd, myConnection);myCommand.Parameters.Add(new SqlParameter("@sitename", SqlDbType.VarChar, 50));
myCommand.Parameters["@sitename"].Value = txtSiteName.Text;myCommand.Parameters.Add(new SqlParameter("@sitephone", SqlDbType.VarChar, 50));
myCommand.Parameters["@sitephone"].Value = txtPhone.Text;myCommand.Parameters.Add(new SqlParameter("@siteemail", SqlDbType.VarChar, 50));
myCommand.Parameters["@siteemail"].Value = txtEmail.Text;myCommand.Parameters.Add(new SqlParameter("@siteaddress", SqlDbType.VarChar, 1000));
myCommand.Parameters["@siteaddress"].Value = txtAddress.Text.ToString();myCommand.Parameters.Add(new SqlParameter("@cra_name", SqlDbType.VarChar, 50));
myCommand.Parameters["@cra_name"].Value = txtCRA.Text;myCommand.Parameters.Add(new SqlParameter("@responseID", SqlDbType.Int));
myCommand.Parameters["@responseID"].Value = Convert.ToInt32(hiddenID.Value);
try
{
myCommand.Connection.Open();
myCommand.ExecuteNonQuery();
}catch (SqlException test)
{
//Response.Redirect("~/error.aspx");
Response.Write(test.Message.ToString());
}
finally
{
myCommand.Connection.Close();
}
View 3 Replies
View Related
Jul 28, 1999
Scenario..
Table 1 = Product (one row per productID, also has second key, KEY2)
Table 2 = Usage (many rows per KEY2)
I have a view that aggregates Usage GROUP BY Key2 - Usage_VIEW
I create a view over Product and Usave_view joining on KEY2 - Final_VIEW
When I query Product with a where Product = 'x'
the time is under 1 second return.
I then take the Key2 value returned and query my Usage_View
the time is under 1 second to return.
BUT, if I query My Final_VIEW with where product = 'x'
I can take a coffee break.
Question? Does the aggregate of Usage get performed before limiting to the matching rows in Product?
Can I use "Force Order" hint to make the first table limit the search on table 2? If so, please give syntax on FORCE ORDER. I can't seem to figure it out.
View 2 Replies
View Related
Aug 27, 2007
Hi there.
I am having a problem where I have a Summary Report for a Region that lists out data for each community in that region (sample below):
West Region
Count
Community 1
N/A
Community 2
14
Community 3
41
Community 4
25
Community 5
38
Community 6
67
Community 7
40
Community 8
52
I have navigation setup such that when I click on a Community (like Community_1 above), the detailed community report is called. I am passing CommunityID as a parameter to the community report. The community report has a CommunityID (literally) parameter setup. This seems fine, but when I click on a community from the Region report (for example, Community_1 above), the community report does not automatically get rendered, it makes me select a community before it renders. I must have something setup incorrectly, but can't figure it out. Any ideas would be appreciated.
I want the community report to be rendered based on the selected community without having to select it again.
Thanks, Mike
View 11 Replies
View Related
Jun 29, 2007
i have to search through differene controls (textboxes,dropdownlist,checkboxes,radiobutton) in an Asp.Net page usingC#.
can anybody tell me how to write the code of searching in button_click.
using dynamic query or stored procedure.
all replies are welcome.
Thanx in advance.
View 3 Replies
View Related
Jan 9, 2007
Hello friends
Can anyone tell me the means by which I can populate a label or a datagrid by executing a selectcommand statement on the form of my webpage. And what is the best way to retrieve data from a SQL datasource, is it by using separate sqldatasources for each different parts of a page that requires different data from different tables in the same database or by using a tableadapter to retrieve the data for the best performance?
Thanks for replying for my previous questions. It was helpful and great in my program implementation.
Thank you
View 1 Replies
View Related
Jan 8, 2008
Hello every body
i am using a view grid to display data
the viewgrid is tied to an sqldatasource control
i want to give the user the ability of modifing data by colomn instead of by row
how could i do ?
ghassan
View 2 Replies
View Related