i getting the following error message in runtime, i have no idea what my username and password is for my computer, does anyone know what this error message means, and how i can get my username and password.
Server Error in '/' Application.
Cannot open user default database. Login failed.
Login failed for user 'ACER-0BCB4DEC3AASPNET'.
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: Cannot open user default database. Login failed.
Login failed for user 'ACER-0BCB4DEC3AASPNET'.
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:
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
P.s Also does any one know how to enable cookies for the login control on website.
i have noticed within the objectdatasource wizard, that something called profile is there, and this is where you specify the cookies, sessions etc. But i dont know where to start with this. Can anyone help?
Hi, We have recently upsized an access db to a sequel server db. The queries in access have been made into views in sql. ASP will be the front end. We are having problems passing an input from a form into a view. In access the parameter had to match what was selected on the form but sequel doesn't like it. At the moment, for testing purposes, the value has to be hard coded i.e. case_id = 64. Is there anything is ASP that can help? Thank you
I've written a Union query that joins 16 different tables. I need to somehow make this into a permanent view so that i can query directly from excel to extract specific data - i guess i can set up excel to pull straight from this view then ?
I'm used to running excel VB code to SQL via Access (linking access up) but want to cut out the middleman now.
Any ideas ?
An example of the Union Query i have built is below :
I am using Stored Procedures and C# to create my very first web app (VS2005 Professional, C#, SQLServer 2005). I am wanting to display the users just inserted details via the form view in read only mode. I have read through several partial examples, but I am still unsure as to how to call the id of the just inserted record and use that ID to display the details in the Form View as many examples do not use stored procedures and make use of VB code (I am using C#) and the SqlCommand. I am pretty sure that I do not have to use SqlCommand as I am using an object data souce with a DAL – but I could be wrong, as I am a noob. My stored procedure reads as follows: ALTER PROCEDURE dbo.usp_ResumeNameDetailsInsertFV @FirstName varchar(50), @MiddleName varchar(50), @LastName varchar(50), @UserID uniqueidentifier AS INSERT INTO [ResumeNameDetail] ([FirstName], [MiddleName], [LastName], [UserID]) VALUES (@FirstName, @MiddleName, @LastName, @UserID) RETURN SCOPE_IDENTITY() The stored procedure is called through the object data source and inserts the record as it should. I have manually tested this through the execute stored procedure in VS Server tab. Below is my Object Data Source: <asp:ObjectDataSource ID="ObjectDataSourceResumeNameDetailsFV" runat="server" DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="{0}" SelectMethod="GetResumeNameDetailsFV" TypeName="ResumeTableAdapters.ResumeNameDetailsTableAdapter" UpdateMethod="Update"> <DeleteParameters> <asp:Parameter Name="NameDetailID" Type="Int32" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="FirstName" Type="String" /> <asp:Parameter Name="MiddleName" Type="String" /> <asp:Parameter Name="LastName" Type="String" /> <asp:Parameter Name="NameDetailID" Type="Int32" /> </UpdateParameters> <SelectParameters> <asp:ControlParameter ControlID="GridViewResumeNameDetails" PropertyName="SelectedValue" Name="NameDetailID" Type="Int32" /> </SelectParameters> <InsertParameters> <asp:Parameter Name="FirstName" Type="String" /> <asp:Parameter Name="MiddleName" Type="String" /> <asp:Parameter Name="LastName" Type="String" /> <asp:ControlParameter ControlID="HiddenFieldGUID" Name="UserID" PropertyName="Value" Type="String" /> </InsertParameters></asp:ObjectDataSource> Below is the partial of my Form View: <asp:FormView ID="FormViewResumeNameDetails" runat="server" Caption="<br />" CaptionAlign="Top" CssClass="formView" DataKeyNames="NameDetailID" DataSourceID="ObjectDataSourceResumeNameDetailsFV" EnableViewState="False" HeaderText="Name Details" HorizontalAlign="Center" OnItemDeleted="FormViewResumeNameDetails_ItemDeleted" OnItemInserted="FormViewResumeNameDetails_ItemInserted" OnItemUpdated="FormViewResumeNameDetails_ItemUpdated" RowStyle-HorizontalAlign="Center" SkinID="FormViewStandard" Width="100%"> Below is my insertion C# code: protected void FormViewResumeNameDetails_ItemInserted(object sender, FormViewInsertedEventArgs e){ GridViewResumeNameDetails.DataBind(); FormViewResumeNameDetails.DataBind(); GridViewResumeNameDetails.Visible = false; FormViewResumeNameDetails.Visible = true; } Any help in writing th C# code to call the stored procedure to call the scope_identity would be appreciated, as this has me stumped, even though I am sure it is quite a simple fix.
need help with my problem i have this view this code change the value field "new_unit" evry month from 1 > 2 > 3 > 4 like this evry 4 month it return to 1 >2.......... ------------------------------------------ for example
if i put unit_date = 01/05/2008 and unit=1 than new_unit=1
my question is how to create a stored procedure that move forward (all the employee) the "new_unit" field in +1 OR "unit_date" value MONTH +1
like create stored procedure name "plus" + so if i run this name stored procedure name "plus"
the stored procedure go to the viewor table and change the code view or table value
so i forward all the the "new_unit" or "unit_date" value IN one (change the cycle)+1
it doesn't matter if it change the "unit" value in the table "dbo.empList" or "unit_date" value
the important thing is that i can forward +1 or backward -1
evry time i run the stored procedure i get +1 (in the "new_unit") and olso create stored procedure name "minus" + so if i run this name stored procedure name "minus" this stored procedure that move backward the the "unit" value in the table "dbo.empList" or "unit_date" value in -1
I want to change the color of the ssas cube calculated member in formview from red background to white or back to default color settings. This also includes changing the text color back to default. What properties do I have to change?
The SQL ERRORLOG shows: Error is 3414, Severity 21, State 2 and says: "An error occurred during recovery, preventing the database 'model' (database ID 3) from restarting." Just prior to this, I get a warning: "did not see LP_CKPT_END".
Any thoughts why this might be and how I can fix this?
Hello, My company Intranet has a form that agents can use to post their comments about the company to upper management, but our customer service department would like to modify the form so that the agent has to pick from a comment type. The dropdown options on the form will be as follows: ComplimentsComplaintsGeneral CommentsSuggestions Each dropdown option has a designated table in a SQL DB.Using postback on the same page, I need to change which fields of the form are visible based upon which dropdown selection the user chooses, and I need the fields to then be inserted into the table that corresponds with the dropdown selection item. For example: If the Compliments dropdown selection is picked, I need a text box to show for the user's location, the name of the customer, account number, and the message box. Once the submit button is clicked, the characters in these boxes need to be inserted into the Compliments table using its data adapter. However, if the user selects Suggestions, the name of the customer and the account number should not be visible, since these fields do not exist and when the submit button is pressed, the Suggestions table should be updated. If you need more information, I will provide whatever is needed. As always, thanks for everyone's assistance. Chris
I have created an installation application which will install the application with SQL Express and .NET Framework 2.0.
If i install this application in a Fresh system(i.e which is not having SQL Express), it is installing the application with new database instance successfully.
But if i try to install the same in a system which is already having SQL Express, throwing "Object reference exception" because it is not able to create the new database instance.
Because of numerous problems trying to get sqlexpress working, I uninstalled it with the intention of reinstalling (via Add or Remove Programs). However, now when I try to reinstall it, I get a message that the I am not making a changes so it won't let me install it.
I do have sql server 2005 developer's edition installed; is that the reason? and does that mean I cannot have both installed on the same machine?
Hi, I got a problem. I installed Microsoft SQL Server Management Studio Express 2005 version. And I created a Compact database. I created an connection in SSMSE to connect the database and opened a query form. then, i run the following sql:
Select * from Table1
It returned 3 records to me. After that, I used program to insert record into this table. Then i ran this sql again, it still show me 3 records. I closed the query form, and re-created a new query form, then run the sql, it returned 4 records to me.
Why? It's very strange and difficult to operate, right? Is there anyone know how to make the SSMSE to return whole records without any close query form and re-create query form operation?
Hi everyone, What is the main difference between first form normalizations and second form normalization ? In my opinion, they are both generated for the same operation which is to prevent redundancy(in other words; duplication of data in several records). So would you please explain it to me ?
Hi All,I've been struggling with this for hours...Could someone please advise me on how to convert my current File based SQL Server Express website to a Server based SQL Express one.Particularly interested in what I need to do in the SQL Express management tool, changes I need to make the projecvt itself and changes needed to get IIS to understand things have been changed.Thanks,Martin.
HiI have a Platinum database which stores dates in integer form e.g the dateis formatted as below:Column_name Type Length Precision------------------------------ ------------------------------from_date int 4 10Some of the dates in the Platinum database are as follows:729115729359730059730241730302730455How can I bring them into SQL 2000 as valid dates.Thanks for your assistanceSam CJoin Bytes!
I am looking to create a constraint on a table that allows multiplenulls but all non-nulls must be unique.I found the following scripthttp://www.windowsitpro.com/Files/0.../Listing_01.txtthat works fine, but the following lineCREATE UNIQUE CLUSTERED INDEX idx1 ON v_multinulls(a)appears to use indexed views. I have run this on a version of SQLStandard edition and this line works fine. I was of the understandingthat you could only create indexed views on SQL Enterprise Edition?
Write a CREATE VIEW statement that defines a view named Invoice Basic that returns three columns: VendorName, InvoiceNumber, and InvoiceTotal. Then, write a SELECT statement that returns all of the columns in the view, sorted by VendorName, where the first letter of the vendor name is N, O, or P.
This is what I have so far,
CREATE VIEW InvoiceBasic AS SELECT VendorName, InvoiceNumber, InvoiceTotal From Vendors JOIN Invoices ON Vendors.VendorID = Invoices.VendorID
I created a query, which makes use of a temp table, and I need the results to be displayed in a View. Unfortunately, Views do not support temp tables, as far as I know, so I put my code in a stored procedure, with the hope I could call it from a View....
I compared view query plan with query plan if I run the same statementfrom view definition and get different results. View plan is moreexpensive and runs longer. View contains 4 inner joins, statisticsupdated for all tables. Any ideas?
I am trying to add records to SQL database, thru <form> </form> on click of button, The system is working fine, Databse table is getting updated correctly. But screen displays the same form again while i want it to open another asp.net page i.e. buy.aspx and also generate an e-mail automatically. I m stuck. Please help. pcg
Relevent code of mine is as below. <script runat="server"> void addtosalelist(Object sender, EventArgs e) { .... .... dbConnection.Open(); .... .... dbConnection.Close(); }
SELECT @topicList that produces a list of all the topic_names in the database seperated by commas. That's fine.
I couldn't follow all the code in this thread (http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=18363) but I was able to extract and modify this code:
DECLARE @topicList varchar(200)
SELECT MAB_topics.topic_name INTO #tmp FROM MAB_topics, MAB_articleIndex WHERE MAB_articleIndex.article_ID = 76 AND MAB_topics.topic_ID = MAB_articleIndex.topic_ID
SELECT * FROM #tmp
drop table #tmp which returns the two topic_names that I'd expect. (Note: this is my very first day declaring variables and using temp tables.) So I keep thinking that the following code would combine the two above working functions. But, when I run it in Query Analyzer, it just returns "(2 row(s) affected)" instead of a recordset.
DECLARE @topicList varchar(200)
SELECT MAB_topics.topic_name INTO #tmp FROM MAB_topics, MAB_articleIndex WHERE MAB_articleIndex.article_ID = 76 AND MAB_topics.topic_ID = MAB_articleIndex.topic_ID
drop table #tmp What am I doing wrong? I'm sure it's something simple but I've been reading and trying and reading and trying for a few hours and haven't gotten it yet. The ideal response would figure out what I'm trying to do as well as what my mistake is and explain how I'm misthinking. A close second would be just fixing my code. :)
I had given one of our developers create view permissions, but he wants to also modify views that are not owned by him, they are owned by dbo.
I ran a profiler trace and determined that when he tries to modify a view using query designer in SQLem or right clicks in SQLem on the view and goes to properties, it is performing a ALTER VIEW. It does the same for dbo in a trace (an ALTER View). He gets a call failed and a permission error that he doesn't have create view permissions, object is owned by dbo, using both methods.
If it is doing an alter view how can I set permissions for that and why does it give a create view error when its really doing an alter view? Very confusing.
CREATE VIEW dbo.vwFeat AS SELECT dbo.Lk_Feat.Descr, dbo.Lk_Feat.Price, dbo.Lk_Feat.Code, dbo.SubFeat.SubNmbr FROM dbo.Lk_Feat INNER JOIN dbo.SubFeat ON dbo.Lk_Feat.Idf = dbo.SubFeat.Idt
When ever I open using SQL Entreprise manager to edit it by adding or removing a field i inserts Expr1,2.. and I don t want that. The result I get is:
SELECT dbo.Lk_Feat.Descr AS Expr1, dbo.Lk_Feat.Price AS Expr2, dbo.Lk_Feat.Code AS Expr3, dbo.SubFeat.SubNmbr AS Expr4 FROM dbo.Lk_Feat INNER JOIN dbo.SubFeat ON dbo.Lk_Feat.Idf = dbo.SubFeat.Idt
I don t want Entreprise manager to generate the Expr fields since I use the real fields in my application. Thanks for help
Hi I'm pretty new to all of this. I downloded a starter kit and am a bit confised as to SQLExpress. I have SQL Server already installed and just wondering what the option are. I am currently using Visual Web Developer Express Edition and in the config file data source is SQLExpress and can't go any further. I don't want to mess with my current setup so just want to get some sugestions first. Anyway hope this makes sense. Thanks GP
I have just created a website with membership just using the standard SqlExpress auto generated file Everything works fine until I upload it to webspace :( I get the following Error 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. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) I don't have SQL Server 2005 :(
if my SQl server/COnnection is "SQL EXPRESS"..Im using an Import name "Import System.SqlClient" on every web form that i have... as well as other SQl command name like "SQLConnection,SQLCommand etc..."is this the correct that im using all sqlcommand in my webform??? well sorry for this im just new..and one more thing..can i include Ado.net on it if my connection is "SQLEXPRESS" just i said? Thanks for the answer....
I am new to this forum . I am running through few problems for sqlserver account settings .
I) My registery key entry for MSSQLserver just has a client folder . 2) My sql server configuration manager just has sqlserver 2005 services , native client configuration and 2005 network configuration.
I can't see any server name or databases under it.
3)I normally work on EMS lite so I can see my ./SQLEXPRESS as server and databases under it and i can create logins etc ..I assigned db_owner role to one of my recent created database. but when I try to connect it says :
The user is not associated with sqlserver connection.
5) i have sqlserver express service running, vss and sql server browser running.
I googled and searched for the solution and it says the authentication mode should be turned to mix mode form win authentication.
But from where. Have i missed some installation .I am able to connect to my other database from EMS.
I am trying to write an application for a MSSQL database, using SQL Express,and Visual Studio (Express edition)I tried to connect to an existing database (named testing) but to no avail.Visual Studio claims the database does not exist.Any ideas?TIA--Q: What is the difference between a mathematician and a philosopher?A: The mathematician only needs paper, pencil, and a trash bin for hiswork - the philosopher can do without the trash bin...
Installation of SP2 in step "Feature Selection" shows SQLEXPRESS unchecked and can''t be edited/checked. I tried it many times on different servers with different OSes, etc
Does it mean that SP2 for Expres Edition should be downloaded and applieв separately?
HiI am using Visual Web Developer 2005 Express and SQL Server Express 2005.From Northwind I can display data to Gridview.Could someone point me in the right direction on two points.How do I start a new database (.mdf) - I cannot find this option.I can change Northwind around - but I want to start my own database. Once I have that sorted - how can I "insert" data into database using a dropdown box?A "dropdown" box such as you would find online. Thanks in advance.Stephen
I need to make a query to a SQLserver db passing values from a dropdownlist and two text boxes as my criteria. Now if nothing is selected and the button is pressed, I would like to return everything that is part of my Select statement. I am having trouble making my sql statement work.
Im sending you my code as an attachment. I've put * around the area i really need help with.
Even if you could just point me in the right direction as to where to look for a good web forms book using VB.NET and ASP.NET I would really appreciate it.
Thanks,
Jose AIM- RangerBud249 Yahoo- RangerBud249
Imports System.Data.OLEDB Imports System.Data Imports System.Data.SqlClient Public Class Test Inherits System.Web.UI.Page Public dbConn As SqlConnection Public da As SqlDataAdapter Protected WithEvents txtStart As System.Web.UI.WebControls.TextBox Protected WithEvents txtEnd As System.Web.UI.WebControls.TextBox Protected WithEvents Calendar1 As System.Web.UI.WebControls.Calendar Protected WithEvents Label1 As System.Web.UI.WebControls.Label Protected WithEvents img_cal1 As System.Web.UI.WebControls.ImageButton Protected WithEvents img_cal2 As System.Web.UI.WebControls.ImageButton Public ds As DataSet
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'the TailNumber is the first thing that will load If Not Page.IsPostBack Then lstAircraft.DataSource = GetAircraft() 'this function will load the Tail Numbers lstAircraft.DataValueField = "TailNumber" lstAircraft.DataTextField = "TailNumber" lstAircraft.DataBind() End If End Sub
Function GetAircraft() As System.Data.DataSet 'this function will load the Tail Numbers Dim connectionString As String = "connection info" Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString)
Dim queryString As String = "SELECT [Aircraft].[TailNumber] FROM [Aircraft]" Dim dbCommand As System.Data.IDbCommand = New System.Data.SqlClient.SqlCommand dbCommand.CommandText = queryString dbCommand.Connection = dbConnection Dim dataAdapter As System.Data.IDbDataAdapter = New System.Data.SqlClient.SqlDataAdapter dataAdapter.SelectCommand = dbCommand Dim dataSet As System.Data.DataSet = New System.Data.DataSet dataAdapter.Fill(dataSet)
Return dataSet End Function
****************************************************************************************************************** this is the area I really need help with
Sub btm_Submit_Click(ByVal sender As Object, ByVal e As EventArgs) Dim connectionString As String = "connection info" Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString) dbConnection.Open() dbConnection.Close() Dim selection As String Dim startTime As String Dim landingTime As String Dim flights As String
Dim selString As String = "SSELECT AircraftID, fromLocation, startTime, toLocation, landingTime, ID, Filename, VSU, local_1 FROM Flights, tbl_FileNames, tbl_VSU"
Dim commandString As String = "SELECT [Flights].AircraftID, [Flights].fromLocation, [Flights].startTime, [Flights].toLocation, [Flights].landingTime, [tbl_FileNames].ID, [tbl_FileNames].Filename, [tbl_FileNames].VSU, [tbl_FileNames].local_1 FROM Flights, tbl_FileNames, tbl_VSU"
selection = "where " & Me.lstAircraft.SelectedValue.ToString & " " & startTime = Me.txtStart.Text & " " & Me.txtEnd.Text = landingTime & " " & [Flights].[ID] = [tbl_VSU].[flight_id]) AND [tbl_VSU].[filename_id] = [tbl_FileNames].[ID]" If Me.txtStart.Text <> "" Then selString = selString & selection End If Session("SelStr") = selString
Dim dbCommand As New OleDbCommand(commandString, dbConnection)
DataGrid1.DataSource = GetFlights(lstAircraft.SelectedValue) DataGrid1.DataBind() End Sub *********************************************************************************************************************
Function GetFlights(ByVal ID As Integer) As System.Data.DataSet Dim connectionString As String = "connection info" Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString)
Dim queryString As String = "SELECT [Flights].[toLocation], [Flights].[startTime], [tbl_FileNames].[ID], [Flig" & _ "hts].[fromLocation], [tbl_FileNames].[filename], [tbl_FileNames].[Local_1], [Fli" & _ "ghts].[AircraftID], [Flights].[landingTime], [tbl_FileNames].[VSU] FROM [Flights" & _ "], [tbl_FileNames], [tbl_VSU] WHERE (([Flights].[ID] = [tbl_VSU].[flight_id]) AN" & _ "D ([tbl_VSU].[filename_id] = [tbl_FileNames].[ID]))" Dim dbCommand As System.Data.IDbCommand = New System.Data.SqlClient.SqlCommand dbCommand.CommandText = queryString dbCommand.Connection = dbConnection
Dim dataAdapter As System.Data.IDbDataAdapter = New System.Data.SqlClient.SqlDataAdapter dataAdapter.SelectCommand = dbCommand Dim dataSet As System.Data.DataSet = New System.Data.DataSet dataAdapter.Fill(dataSet)
Return dataSet End Function
Private Sub img_cal1_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles img_cal1.Click 'this will make the calendar for start visible when clicked and not visible if clicked again Session("Cal1") = True Session("Cal2") = False Me.Calendar1.Visible = True End Sub
Private Sub img_cal2_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles img_cal2.Click 'this will make the calendar for end visible when clicked and not visible if clicked again Session("Cal2") = True Session("Cal1") = False Me.Calendar1.Visible = True
End Sub
Private Sub Calendar1_SelectionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Calendar1.SelectionChanged 'this will put the date selected in my text box as a short date If Session("Cal1") = True Then txtStart.Text = Calendar1.SelectedDate.ToShortDateString Session("Cal1") = False ElseIf Session("Cal2") = True Then txtEnd.Text = Calendar1.SelectedDate.ToShortDateString Session("Cal2") = False End If Me.Calendar1.Visible = False
Can anyone help me with this problem? I have a form with three drop down lists. From these lists, the user selects an accountID, the territory that ID is from, and the territory that ID is transfering to. Upon submission, that account number is inserted into the table, along with the TerritoryID, RegionID, DivisionID, and EmpID associated with both of the territories selected. However, upon running this, the accountID and ToTerritory info are inserted once, but the FromTerritory data is inserted tens of thousands of times. Although they are not entered into the same record, which i eventually want to happen, i do want to figure out why so many duplicate entries for the FromTerritory are entered. Here is my code and the stored procedure to enter the FromTerritory. I would appreciate any help. -------------------------
Sub InsertData()
Dim sql as string
dim sql1 = "insertaccounttransfermike 'AccountID''" & AccNumber.SelectedItem.Value & "'" dim sql2 = "insertaccounttransfermikefrom 'FromTerritory''" & FromName.SelectedItem.Value & "'" dim sql3 = "insertaccounttransfermiketo 'ToTerritory''" & ToName.SelectedItem.Value & "'"
' Create Connection Object, Command Object, Connect to the database Dim conn as New SQLConnection(connstr)
Dim cmd1 as New SQLCommand(sql1,conn) Dim cmd2 as New SQLCommand(sql2,conn) Dim cmd3 as New SQLCommand(sql3,conn)
SELECT Territories.TerritoryID, Regions.RegionID, Divisions.DivisionID, Employees.EmployeeID FROM EndoscopySqlUser.Territories INNER JOIN EndoscopySqlUser.Regions ON EndoscopySqlUser.Territories.RegionName = EndoscopySqlUser.Regions.Region INNER JOIN EndoscopySqlUser.Employees ON EndoscopySqlUser.Territories.TerritoryID = EndoscopySqlUser.Employees.TerritoryID INNER JOIN EndoscopySqlUser.Divisions ON EndoscopySqlUser.Regions.Division = EndoscopySqlUser.Divisions.DivisionID, accounts WHERE ( (EndoscopySqlUser.Employees.DateLeft IS NULL) AND (EndoscopySqlUser.Territories.TerritoryName=@FromT erritory)) GO