.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Sharon Maxwell
Post New Web Links

Parsing Data Into Variables

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :Sql Server
 
Hi All, At present I have a number of jobs that are scheduled and executed through SQL Agent.  The Agent is set up to execute batch files that parse data into variables contained within the packages themselves. Is there anyway that I can get data into variables without using batch files just to make the process more integrated in SSIS rather than starting the process in SQL Agent to start the job, coming out of SQL Server to execute the batch file and then back into SQL Server to run the packages detailed in the batch files? I would like to point out that this is something I have inherited not built myself. Many Thanks B_G


View Complete Post


More Related Resource Links

Global Variables and data types

  
Hi, I have a small issue with the datatype problems. This is what my scenario is. I have a global variable "Qtr" declared as "Int32" datatype. Next, i have a ActiveXscript with VBScript Language. With the below piece of code. All it does, it will calculate and assign the calculated value to the global variable "Qtr". But due to some datatype conversion problem it is not displaying the Calculated value. It is showing null. But the value in the local variable is getting displayed. Can anyone figure out what the problem is all about. I have the option of taking the String datatype for the global variable but in the next step in the workflow , we have an stored procedure call i.e. an execute sql task where we will be call a stored procedure EXEC sp ? where the parameter datatype is an INT in the database. That is why i am finding problem.  I have used the work around i.e. using SSIS advanced expressions and avoided the parameter mapping and all. Function Main() 'msgbox("test") Dim Qtr Dim currentYear 'Constants qYears = 3 Qtr= (currentYear - qYears) * 10 + 4 msgbox(Qtr) msgbox("Assigning the value to the variable") DTSGlobalVariables("Qstart").Value =  Cint(Qtr) msgbox("Display Value in the variable") MsgBox(DTSGlobalVariables("Qtr").Value)      End Function Can a

Regarding Ui1 data type parsing in xml file

  
Hi all, I am sending data to host application in the xml file format given below <communicationData deviceStatus="D0"><communicationData> where "deviceStatus" is ui1 data type. The host application  throws a error " error: parsing "D0" as ui1 datatype ". I have tried to send deviceStatus value in decimal format as well but host application is not resposding correctly. If the hex value does not contain any alphabet then host application respond perfectly fine but if hex value contain any alphbet then host application throws error " error parsing "D0" as ui1 datatype" Can any one please tell me how to convert hexvalue(with alphabet) to Ui1 data types Thanks In advance Ravish Kumar      

Parsing XML data

  
Hello,I am using YQL! for one of my projects: http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20%28%22YHOO%22%2C%22AAPL%22%2C%22GOOG%22%2C%22MSFT%22%29&format=xml&env=store%3A%2F%2Fdatatables.org%2FalltableswithkeysHow can I get the following response for the results node in an object? Any ideas on the best way to approach this?

Parsing XML RSS Data

  
Hello, I am looking to make a small project that can take an RSS feed that is stored in XML format (i.e. http://www.bbc.co.uk/radio1/rss/rss_radio1.xml) and display it on my asp.net page. A simple XML Datasource does not seem to accept nor like a url as the defined source. How can I make an ASP.NET page that will grab data from this remote XML source and display it?

Incomplete/truncated data Serialized to disk. Error:End of Stream encountered before parsing was com

  
Greetings!! i have a dataset which is constantly serialized & deserialized by multiple threads (in a thread safe manner using lock statement) using System.Runtime.Serialization.Formatters.Binary.BinaryFormatter (.net 2.0). The Code below works pretty fine but in some rare scenarios it gives the above exception while deserializing. public void SerializeData(string path, DataSet currentData) { dataStream = new FileStream(path , FileMode.Create, FileAccess.ReadWrite); try { biFormatter.Serialize(dataStream, currentData); } finally { dataStream.Flush(); dataStream.Close(); } } DataSet DeserializeData(string path) { dataStream = new FileStream(path , FileMode.Open, FileAccess.ReadWrite); DataSet storedDataSet = new DataSet(); storedDataSet.Locale = CultureInfo.InvariantCulture; try { storedDataSet = (DataSet)biFormatter.Deserialize(dataStream); } finally { dataStream.Close(); } return storedDataSet; } When i observed the serialized file i realized the file had some in incomplete/truncated data. The truncated file loo

Putting data from a variables into a compaq sql database row of fields?

  
Hi everyone,  I have not used database in two years and have forgotten how to set one up completly. I have made a compaq databse 3.5 and have built the columns. I know how to put the data in manualy. I watched the Video on database and it showed how to bind controls to the datbase but it gave no method when you have the data in variables.  What I have is 7 variables some are using arrays and some are made up from data in  the arrays. I need to populate the db with the data in these variables at the time when my applications has the data ready. I have the connection set up and it does open and close the connection but every search I have made has used binding to bind database to a control that has the data in it.  What method would be the best to use performance wise? Could you point me to an example of this method? CurtisAlways Lost in Code, Always mark answers as correct if they answer you question and solve your problem. This way others when searching for similar problems can find the answer faster.

Populate a Data Flow Task's variables with values from a .dtsConfig file?

  
I have an SSIS Project to import exchange rates from an XML file into SQL. The project works when I have certain values hard-coded into variables, such as the URL of the XML File, proxy username and passwords etc. I decided to put in a .dtsConfig file, and have it update the values of the variables in the data flow task. So, one of my SSIS Packages in this solution is called ECBDailyRates.dtsx. It contains one control flow, which is a data flow task. The data flow task is a script task which does some XPATH on an XML file, and then provides outputs to an OLE DB Destination, which in turn puts the data into a table in SQL. That much worked before I put in the dtsConfig file. There are a few variables declared inside the data flow task, such as; PricesXMLUriDaily, String ProxyAddress, String ProxyAddressPort, Int32 etc. etc. These are now being updated from the dtsConfig, which is below. It was my understanding that SSIS would run through the config, and update any of the variables as required, and then run my data tasks. However when SSIS runs my script task, none of the variables have been populated, and so it falls over... as it were :) <?xml version="1.0"?> <DTSConfiguration> <DTSConfigurationHeading> <DTSConfigurationFileInfo GeneratedBy="...." GeneratedFromPackageName="dim_Institution" GeneratedFromPackageID="

I need to read the data from one row and place this data into variables How would I do this?

  
Hi everyone,  I have not used a database in two years and then only for binnding to a datagrid view. I have made a compaq databse 3.5 and have built the columns. I know how to put the data in. I watched the Video on database and it showed how to bind controls to the datbase but it gave no method when you have the data in variables or when you need to get the data from the database and put them in a variable. I have also searched the forums but as of right now I have not found any example of reading a particular row and placing the data from certain columns into variables. I did find from different examples a way of updating the data base.  I am using the following code to update the database from variables.   http://forums.asp.net/t/1234353.aspx Dim dSet As DataSet Dim dRow As DataRow Dim dTable As DataTable Dim sqlCmd As SqlCeCommand Dim sqlConn As SqlCeConnection Dim sqlDapter As SqlCeDataAdapter sqlConn = New SqlCeConnection("Data Source=C:Database1.sdf") sqlDapter = New SqlCeDataAdapter sqlConn.Open() sqlCmd = New SqlCeCommand("SELECT * FROM MyTable", sqlConn) sqlDapter.SelectCommand = sqlCmd dSet = New DataSet sqlDapter.Fill(dSet, "MyTable") dTable = New DataTable dTable = dSet.Tables("MyTable") dRow = dTable.NewRow dRow(0) = 2 dTable.Rows.Add(dRow) ' sqlCmd = New

need some help parsing data views

  
not sure how to ask this, but, I've got an internal customer who has to grab a lot of data from a SCCM view. Specifically the v_R_User view. All of the columns are generated in the DB by AD attributes, one of them being the Manager field. We're using SQL Reporting and when the data from the column is displayed it's displayed exactly as it is in the column. thus the column data reads as the distinguished name and I'd like it to be displayed in the report as just the manager's name.  Not a SQL guru, so not sure how ot go about doing this. Any help will be greatly appreciated.

code behind - variables and gridview-selected data

  

Hello,

I'm a newbie using VWD 2010 Express, asp.net 4.0.  

I'm also learning VB and C#.  I'm pretty lost, so please direct me. 

I'm trying to understand the code-behind behind gridview select/edit buttons.  I'm not sure whether I need to look for asp.net or VB/C# tutorials. 

   protected void ds_Selecting(object sender,SqlDataSourceSelectingEventArgs e)

Using above example, 
1. How do I access the user-selected row data from the gridview in the code-behind? 
2. What is 'sender' and 'e'? 

If there's a tutorial that explains these, please direct me.

Thank you!



Data Paging and passing variables to text box

  

Hi,

 

Please help I am having troubles making the code run. I have a web page with a gridview and a checkbox. I would like the button when selected to pass the category id. I have managed to get it work without paging. Once the paging kicks in see below, I am unable to run the code. Please see below.

 

Thanks,

Nijojo.

 

 

In the design: ASPX

 

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
        &nb

Data Parsing

  

What would be the best way to parse data multiple times from a column?

ABC EFG HIK123456789 01

When this substring is run, we get some of the data 

LTRIM(RTRIM(substring(column, CHARINDEX(' ', column, CHARINDEX(' ', column)+1), 5)))

HIK123456789

But how do we get the last two numbers (01) from the string?


Is there a way of creating an Ado.Net Entity Data Model filtered on a Session variables (C#)

  

I'm trying to customize correct displaying of dropdownlists so information shown in comboboxes is relevant to the kind of user logged on (maintaining referential integrity at data level)

e.g.: I have a user already logged on and depending on his profile I'd like to display to this user only the portion of the database that he would be allowed to see. That would mean that he might have acces to an specific subset of data, e.g.: businesstype = "3", loging level = "2", etc.

Is there a way of creating an Ado.Net Entity Data Model filtered on a Session variables as to maintain proper referential integrity at data level? So it means that the filtering must apply to all entities contained in the .edmx model at once.


Ado.Net Entity Data Model filtered on Session variables ... is that possible?

  

I am currently working on a Dynamic Data 4.0 project with C# and I'm trying to customize correct displaying of dropdownlists so information shown in comboboxes is relevant to the kind of user logged on (maintaining referential integrity at data level)

e.g.: I have a user already logged on and depending on his profile I'd like to display to this user only the portion of the database that he would be allowed to see. That would mean that he might have acces to an specific subset of data, e.g.: businesstype = "3", loging level = "2", etc.

Is there a way of creating an Ado.Net Entity Data Model filtered on a Session variables as to maintain proper referential integrity at data level?


Binding WPF Controls to an Entity Data Model

  
In this interview, programming writer, McLean Schofield, demonstrates how to bind WPF controls to an entity data model, using Visual Studio 2010 Beta 1. You can also learn more in the topic: Walkthrough: Binding WPF Controls to an Entity Data Model.

Surrogate vs Natural Primary Keys - Data Modeling Mistake 2 of 10

  
In case you're new to the series I've compiled a list of ten data modeling mistakes that I see over and over that I'm tackling one by one. I'll be speaking about these topics at the upcoming IASA conference in October, so I'm hoping to generate some discussion to at least confirm I have well founded arguments.

The last post in this series Referential Integrity was probably less controversial than this one. After all, who can argue against enforcing referential integrity? But as obvious as surrogate keys may be to some, there is a good deal of diversity of opinion as evidenced by the fact that people continue to not use them.

Editing the Data in a GridView

  
In addition to deleting a GridView's underlying data, another common need is to allow end users to edit the data displayed in a GridView. With ASP.NET 1.x's DataGrid control, editing the data is certainly possible, but requires creating three event handlers and writing a dozen or so lines of code. With the GridView and ASP.NET 2.0, it is possible to create an editable GridView without writing a single line of code! All of the necessary functionality is encapsulated within the GridView.

The GridView allows editing on a row-by-row basis. An editable GridView contains an additional column with an Edit button in each row. When the end user clicks on an Edit button that row becomes editable, causing the Edit button to change to Update and Cancel buttons and the other columns to become TextBoxes. The end user can then update one or more column values and click Update to save their changes.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend