DataSource Controls :: Executing Multiple Scripts At Once?
Apr 22, 2010
We have about 500 scripts that we are modifying at development server . These modified scripts have to be run at the live server .
Well instead of running each script, we are thinking of a platform independent application (If we develop in dotnet the user(DBA) has to have dotnet framework installed,hence i am not thinking of a dotnet application) which will execute the script.
(These scripts will be enclosed in a folder and sent to DBA. Through the newly developed application the DBA should be able to browse this folder and on clicking a particular button the scripts placed inside the folder should run.)
Basically such an application should be able to connect to the database and run the scripts that we saved in the folder....
View 4 Replies
Similar Messages:
Apr 17, 2010
I need to execute the stored proc accross the parameters resulted from select statement
I have created one stored procedure which require one parameters ( username ) ..
i need to execute this SP accross the Select Statement which lists all the username
somethibng like :
Set @username = (Select usename from my table)
EXEC dbo.Duplicate_Data @username
View 7 Replies
Feb 2, 2010
I have an article submission system on my website whereby a user inputs a bunch of information and submits it to the database. After the user presses the "submit" button, apart from submitting the article to the database, I want to also execute another rather large SQL query that inserts additional data into a seperate table.
However since this execution may take a while, I do not want the user to have to wait for the query to be successfully completed before they are forwarded to the "submissionsucess.aspx" page. In other words I would like the larger sql query to take place while the user is still on the website. So I was wondering if there is a way to do the following:
1. User submits article.
2. Simple submit query is executed.
3. Submit query is finished...start complex longer query (takes time).
4. User is forwarded to success page, user then continues to browse website. Complex query still executing at the same time, while user browses website.
5. Complex query is finished.
View 4 Replies
Jan 28, 2010
I have a web project that sends out a customized email after certain user events (like a status change). I also have an SSIS package on the database that pulls in data from one database and updates another database with that data. I want to be able to compare the data and if a particular field's data for that record is different between the two databases is different, I want to be able to use the dll I created for the web app to send the appropriate email.
View 2 Replies
Jun 23, 2010
i am having a problem in executing the SSIS package through an asp.net application. i'm using c#. every time i run the package through web, i think the package is not disposed properly so until and unless i stop the application the package won't execute...i am not able to dispose or unload the package. i'm geeting errors like
'WebDev.WebServer.EXE' (Managed): Loaded 'C:WINDOWSassemblyGAC_32CustomMarshalers2.0.0.0__b03f5f7f11d50a3aCustomMarshalers.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. The result of the expression ""EXEC " + @[User::vRowData]" on property "SqlStatementSource" cannot be written to the property.
The expression was evaluated, but cannot be set on the property. : Package Execution results: {0}
here is my code
Application app = new Application(); //Package package = app.LoadPackage("D:ChipRewards_WorkingFolderChipRewardsCodebaseHeathPlanCommonTrunkSSIS PackageETL_WorkFlowETL_WorkFlowDataImport.dtsx", null); //package.ImportConfigurationFile("D:ChipRewards_WorkingFolderChipRewardsCodebaseHeathPlanCommonTrunkSSIS
PackageETL_WorkFlowETL_WorkFlowETLConfig.dtsConfig");
[Code]....
View 1 Replies
Mar 31, 2010
say you have a table named 'Events' and in there is a list of items such as:
ID = 1
EventName = Staff Meeting
StartTime = 10/04/2010 10:30:00
EndTime = 10/04/2010 11:00:00
---
ID = 2
EventName = Customer Meeting
StartTime = 15/04/2010 13:00:00
EndTime = 15/04/2010 14:00:00
and so on (many more records). Now, whenever a record reaches its' end time, how can I execute SQL commands to delete that data (or mark as finished) and UPDATE another table?
This needs to be running constantly so I was thinking of building it into a Windows Service but can you suggest a better way of doing it?
View 4 Replies
Jun 23, 2010
I am having problem in diffrentitate error between internet connection loss error and Other Error in query for example: duplicate record found.
Both the error fall into System.Data.SqlClient.SqlException category.
But the way to handle both this 2 error is different.For connection error , i need to bring user to connection loss page while for duplicate record found error, i need to show the user a pop up.
Unless i do a checking exactly on the error message , else i have no ways to differentiate connection loss error and any other error. Am i correct for this?
View 1 Replies
May 13, 2010
[Code]....
SelectCommand="Execute ClassesSelect" runat="server">
<SelectParameters>
<asp:ControlParameter Type="Boolean" Name="@all" ControlID="chkAll" PropertyName="Checked" />
</SelectParameters>
</asp:SqlDataSource>
View 1 Replies
Mar 2, 2010
I open a sqlconnection and sqlcommand. I execute a stored procedure and get the scope_identity from that procedure to be used within another procedure that needs to be fired. Unfortuntley if the second procedure fails forwhatever reason the data change for the first procedure commits anyway. I kind of want to do a began transaction end transaction on the c#.net side. Also I need to execute a stored procedure multiple times....
View 2 Replies
Mar 23, 2010
when i am executing xmlreader in enterprise library 4.1, iam getting an error like below
error: Invalid command sent to ExecuteXmlReader. The command must return an Xml result.
my code:
SqlDatabase
db = (
cmd = db.GetSqlStringCommand(
xmlReader = db.ExecuteXmlReader(cmd);
db = null;DbCommand cmd =
null;XmlReader xmlReader =
null;SqlDatabase)DatabaseFactory.CreateDatabase();"select
* from emp");DataSet ds = db.ExecuteDataSet(cmd);
View 1 Replies
Nov 2, 2010
I am creating entries in a contract table using linq to sql.
One column needs to conditionally be assigned an application number from a range of values.
I'd like to simply increment the max existing value, however it is a multi-user application and I'm concerned about multiple contracts receiving the same app number if they happen too close together.
Is there a way to either force the entire thing to use the same transaction, or to execute both during the same submit?
View 4 Replies
Jan 1, 2010
i need to restore Database.mdf; I create a blank new database exactly the same name as the .mdf file. However, I could not restore the database.
The error message prompted was:
TITLE: Microsoft SQL Server Management Studio Express
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.Express.ConnectionInfo)
ADDITIONAL INFORMATION:
Cannot open backup device 'C:inetpubwwwrootTCPSystemApp_DataDatabase.mdf'. Operating system error 32(error not found).
RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3201)
click: [URL]
BUTTONS:
OK
View 10 Replies
Mar 7, 2011
I am trying to design my logic to do this but I want to create a dataSet which will have records from several databases, The records all have the same layout.
I am reagin the connection string paths from a table in a database.
I am asking for your help in trying figure out my logic.
Should I use the connectionString builder in conjunction with a loop to Connect, read a record into a dataset Until therer are no more records to be read from my databse table with the database name/paths tables ?
Here is my beginning code which deals with one database:
[Code]....
View 2 Replies
Jun 4, 2010
Would it be better to have a sp return multiple result sets and use NextResult() or have subsequent call to dr.execute.... () and hadle one result at a time?
To me using nextResult() on a multiresult datareader would be cleaner and easier - but it does not seem to be very "atomized". I guess I am wondering can the cost of executing multiple commands be neglected? Seems like executing multiple commands and receiving a single result set would also be easier to read/test/understand.
View 1 Replies
Mar 23, 2011
I am trying to program the where prameters for this in code behind in C#, and is there really no way to do more than one parameter? Or am I not understanding this correctly? It seems only the 2nd parameter gets executed, no matter which one is at begining. I debug and seems they both get executed fine, but my listview doesn't get filtered and instead only the 2nd paramter works. Look at my code:
Also, if I do myLinq.Where = "division ==1 and someotherInt = 2", it works fine, but if I do two different data types, it will throw error. Since I want to filter with two different data types, hwo do I do this?
Parameter pram1 = new Parameter();
pram1.Name = "division";
pram1.DbType = DbType.Int32;
[code]...
View 20 Replies
Sep 4, 2010
I'm having a question about the LinqDataSource. Does anyone know if it's possible to perform multiple inserts with the LinqDataSource? Let's say for example that I have 2 tables.
Table A
AID = PK autoincrement Name AddressA FK AddressB FK
Table B
BID = PK autoincrementStreetNumberPostalCodeCountry
These tables are just examples to clarify my question. Let's say that I have a FormView with a LinqDataSource where the user can enter his name en a billing address (A) en delivery address (B). Now I would like to know if the LinqDataSource is able to insert 2 records in table B and use these ID's to insert them in table A together with the name?
View 2 Replies
Jun 8, 2010
i want to know how to connect to multiple databases in sql from our asp.net code??
View 4 Replies
Mar 9, 2010
is there a SQL statment i could write that would sum each column and allow me to then access each sum individually
i.e
Dim objCmd As New OleDb.OleDbCommand("SELECT SUM(expression) FROM orderForm WHERE OrderDate=@OrderDate", objConn)
is there anything i can replace expression with such that all the columns in orderForm could be summed and returned as one record
or is there a way to replace expression with something that would allow me to just keep changing the paramater so i could continuously reexectute the same command w/o having to create a new command for each column
View 2 Replies
Jan 24, 2010
I have field_1, the data format store in the field is about "Mary, Amy, Billy, Ma"
how can i extract the record that the field_1 has Mary.
I can't use the like'%Mary%' because it can extract 'Ma' too.
I would like to extract exactly Mary. or can i split the field_1 by ',' in sql?
View 6 Replies
Jan 20, 2010
I am currently trying to create a SQL statement that does a multiple count on a table. The table has a number of reports each listing the "User" who created that report and if that report is "Famous" (A famous report is symbolised as 2 in the table).
What I need to create is a SQL statement that returns each User with the total number of reports he/she has created and how many of these reports are famous. My current SQL statement looks like:
[Code]....
View 4 Replies
Feb 6, 2010
I am creating an online employment application, and instead of creating a table with 20 columns for job duties that may or may not receive values, I simply want to create 3 columns
ApplicantID
EmployerName (Name of Work history Employer)
JobDuty
I want to create a form on a page with 10 textboxes so the applicant can type in some job duties they had at that job.
Is there a way in C# or SQL to then cycle through and insert the textbox values as separate rows?
View 4 Replies
Aug 3, 2010
i have a table containing multiple agents , another three containing events ( three types of events , each category in a diffrernt table) organised by each agents! , i have to figure out how to fill a grid view that regroups a summary of the activity of every agent ! for example :
AGENT EVENT1 EVENT2 EVENT3
agent1 3 0 2 agent2 4 4 1
agent3 5 4 2
that means that the agent 1 have organised 3 EVENT1 0 EVENT2 and 2 EVENT3 ....
i have used the count(*) clause to fgure out the number of rows in table events referencing to each agent (group by) but it seems that value 0 is not returned by the clause , so i'm having a problem getting the exact values!
secondal , i have putted two calendar that will fix the beginnig and the end of the summary , but it seems that the end day is not included : it says 18/01/2010 00:00:00 and i have some events planned in 18/10/2010 14:10:00 so they are not counted !
View 4 Replies
Jun 16, 2010
I am stuck with conditional multiple eval declaration of navigateurl property of hyperlinkI want to bind the navigate url property depend on user selection and set its visible property based on NULL value in SQL databse at the same timeThe code that i have at the moment :
<asp:Hyperlink ID="Hyperlink1" runat"server" NavigateURL='<%#Eval("link1") %' Visible='<%#ISNull(databinder.eval(container.DataItem, "link1"))%>' </asp:HyperLink>
In the code behind i run function ISNull, which works fine returning either true or false depend on value, however it only works for single EvalI believe that i am looking for function code behind that returns the value of Eval, so if user selects Product1 i want link1 to be bound to navigateurl and set its visible property if link isnot null in database but if user selects Product2 or Product3 then i want the same hyperlink to display link2 or link3, set its visibility again based on null values from ISNull function
View 3 Replies
Oct 4, 2010
I want to pass to a DataSource(SQL, Linq) more than one SelectParameter or what ever will do the work.I have many ArtistIds i want to pass to my source, so that it will display only those entries with my Parameters.My Problem is, that i dont know in which Format i can pass more than one Parameter, till now i used QueryStrings but that only works for one Parameter, no? I have a DataTable filled with all my IDs and im system-caching it to pass it from a Search-Site to a Detail-Site, maybe theres a better way?
This is my Source:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:MvcMusicStoreConnectionString %>"
SelectCommand="SELECT Album.Title, Album.Price, Album.AlbumArtUrl, Artist.Name, Genre.Name AS Expr1 FROM Album INNER JOIN Artist ON [code]...
View 1 Replies
Apr 8, 2010
Ok I hope I can describe this clearly. This is all demo code nothing in production.Right now I have a stored procedure that is
[Code]....
This will return only one row as ID is uniquethen I have a procedure that gets all the colors that are available for this model number and i use that data in a drop down list, it is like this
[Code]....
this can return multiple rows with different colors.Right now i am opening a connection getting the product data, consuming that to properties of a class, then to get the data from the Colors I open another connection run the procedure with the model parameter being the model returned from the first sproc and bind that to my ddl.I want to do this in one connection and just get two result sets back. So how do I set the parameter of the second procedure to be the model from the first?
View 8 Replies