I have an ASP page which uses an SQL data source control, as shown below: <asp:SqlDataSource ID="mySQL" runat="server" ConnectionString="<%$ ConnectionStrings:mySQLConnectionString %>" SelectCommand="SELECT device FROM device_table WHERE (device_id IN (@devicelist))"> <SelectParameters> <asp:Parameter DefaultValue="" Name="devicelist" Type="String" /> </SelectParameters> </asp:SqlDataSource>The problem is getting the "IN" clause of the select statement to work via the ASP page with code behind in C#. If I test the query in the page designer when configuring the SQL control by inserting 'device-1','device-2','device-3' as the value for the "devicelist" parameter, everything works as expected. However, when that same value is written programmatically into the DefaultValue of the parameter, the resulting query contains no results (as if the string contents are invalid). If I alter my program to supply a single entry (with no commas) it seems to work as well. I suspect the comma (and possibly the single-quote) characters in my string when multiple entries are involved are causing the issue.Is there a proper technique for getting the requisite quote-delimited, comma-separated list into the SQL control command parameter correctly? Should I be using some sort of escape sequence for the single-quote and comma characters? Should I be using another "type" for the parameter; one that accepts an array of entries? I have not been able to find any examples or documentation that provides an answer.
[DTS.Pipeline] Error: "component "Excel Source" (1)" failed validation and returned validation status "VS_NEEDSNEWMETADATA".
and also this:
[Excel Source [1]] Warning: The external metadata column collection is out of synchronization with the data source columns. The column "Fiscal Week" needs to be updated in the external metadata column collection. The column "Fiscal Year" needs to be updated in the external metadata column collection. The column "1st level" needs to be added to the external metadata column collection. The column "2nd level" needs to be added to the external metadata column collection. The column "3rd level" needs to be added to the external metadata column collection. The "external metadata column "1st Level" (16745)" needs to be removed from the external metadata column collection. The "external metadata column "3rd Level" (16609)" needs to be removed from the external metadata column collection. The "external metadata column "2nd Level" (16272)" needs to be removed from the external metadata column collection.
I tried going data flow->excel connection->advanced editor for excel source-> input and output properties and tried to refresh the columns affected. It seems that somehow the 3 columns are not read in from the source file? ans alslo fiscal year, fiscal week is not set up up properly in my data destination? anyone faced such errors before?
RE: XML Data source .. Expression? Variable? Connection? Error: unable to read the XML data.
I want my XML Data source to be an expression as i will be looping through a directory of xml files.
I don't see the expression property or the connection property??
I tried setting the XMLData property to @[User::filename], but that results in:
Information: 0x40043006 at Load XML Files, DTS.Pipeline: Prepare for Execute phase is beginning. Error: 0xC02090D0 at Load XML Files, XML Source [108]: The component "XML Source" (108) was unable to read the XML data. Error: 0xC0047019 at Load XML Files, DTS.Pipeline: component "XML Source" (108) failed the prepare phase and returned error code 0xC02090D0. Information: 0x4004300B at Load XML Files, DTS.Pipeline: "component "OLE DB Destination" (341)" wrote 0 rows. Task failed: Load XML Files Information: 0xC002F30E at Bad, File System Task: File or directory "d:jcpxmlLoadjcp2.xml.bad" was deleted. Warning: 0x80019002 at Package: The Execution method succeeded, but the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. SSIS package "Package.dtsx" finished: Failure. The program '[3312] Package.dtsx: DTS' has exited with code 0 (0x0).
I have a DB with the folloing fields... ArticleID, ArticleTitle, PublishDate(DateTime Field), EndPublishDate(DateTime Field).... What I want to do is show in a list view only the articles where the date is on or after the PublishDate and before or on the EndPubishDate. I thought I could simply do something like this SELECT ArticleTitle, PublishDate, PublishEndDate, PublishedFROM UserArticlesWHERE (Published = @Published) AND (PublishDate >= @PublishDate) AND (PublishEndDate <= @PublishEndDate)
Well I can't... can someone explain how I can do this please... I understand the the PublishDate and EndPublsihDate need a variable... The info is in the DB I just don't know how to do what I need to.
I wonder if anyone can tell me how we can run select queries in an OLE DB data flow task and tell the target SQL 2000 server it should allow reads at all time. Currently when a lock is on the source table our SSIS package will sit and wait untill the lock on the source table is gone.
I have read only permission in the source (OLTP) database. The source database is running in SQL Server 2000 and the size is more than 200 GB. I need to pull data from source and load target which is running in SQL server 2005.
Following are the objectives I want to achieve.
Data should be loaded on incremental basis.
Whatever changes take place (Update/Delete) in source, that should be replicated to already uploaded data.
Here I want to mention that, the source database does not have any identification key or timestamp column like Updated_Date by which I can filter the data which are recently inserted or updated into the source and upload the same. The source does not maintain any history data also. So I do not have any track of deleted record also.
I don€™t have any scope to change the schema in the source. In this scenario can anybody suggest me the best approach to achieve the above mentioned objectives?
Can I retrieve only the recent updated or inserted date form transaction log back up. Can log shipping solve the give the solution?
One more question. Say I have a table and I am exporting/importing all the data from/to my target table using SSIS or DTS. In this scenario does using query or using directly the table affects the performance?
I have an SQL data source on my page and I select "Table". On the next screen I pick the fields I want to show. Then I click the "Advanced" button because I want to allow Inserts, updates and deletes. But its all greyed out abd I can't check this option. The UID in the connection string I am connecting under has the correct permissions in SQL server to do inserts, update and deletes too. Anyone know why it would be greyed out? The connectionstring property in the aspx code is dynamic but this shouldn't be the reason because I have used this before with success
At our business we are getting a lot of PDF documents that are being hand keyed into a database. Has anyone heard ior know of a SSIS Data Flow Source component that I coud use to read thos documents into a data stream (?) and process?
All examples I found refer to classes under Microsoft.SharePoint namespace. However, I have the SharePoint CSOM that only gives me the Microsoft.Sharepoint.Client namespace.
I need to read the selected values of a multichoice field, but not sure how to do it with classes in the namespace above.
everthing works, exept the TSQL_x0020_Reference_x0020_Numbe field.
1) Production data with column headers: Key, Facility, Line, Time, Output 2) Costs data with column headers: Key, Site, Cost Center, Time, Cost
The tables have a common key named obviously as Key. The data looks like this:
Key Facility Line Time Output Alpha
I would like to have two pivot tables which I can filter with ONE slicer based on the column Key. The first pivot table shows row labels Facility, Line and column labels Time. Value field is Output. The second pivot table shows row labels Site, Cost Center, and column lables Time. Value field is Cost.How can I do this with Power Pivot? I tried by linking both tables above to a table with unique Keys in PowerPivot and then creating a PivotTable where I would have used the Key from the Keys table.
Hi all, Can anyone tell me how I can do a "Dirty Read" on a SqlDataSource Control? I'm affraid that the record locks are causing problems on the live system. It is connected to an infromix db using odbc. Thanks.
hi gurus, I am working on creating a new project in asp.net and was having problem in locating the sqldatasource and gridview control objects in the data toolbox. Can anybody help me in adding these controls to the toolbox? OS=Windows XP Server =Sql Server 2005 Visual studio 2003
I noticed the other day the option to use source control in SQL Server management studio. My question is how do I add sln to existing databases in order to add them to source control??
I'm in need of a source control system that integrates with the Management Studio so that every time i want to modify a table, view, procedure etc I have to check it out from the object explorer and then check it back in again. I have used Visual Source Safe before but never with a database...is it fully integrated with SSMS? What can I do to make this work as smoothly as possible?
Is there any other IDE that handles this better than SSMS?
-- Lumbago "Real programmers don't document, if it was hard to write it should be hard to understand"
Why can't another developer check out SSIS packages from source control in TFS. I have given the developer all the permissions out there. I was the one who had created an SSIS solution/project local on my machine and then added to source control in TFS under the teamproject. The developer can do everything except in the source control explorer, everything is grayed out. I know you can set up permissions in source control explorer, and I have done that. but still no luck. Can it be related to workspace. When I open the Souce control explorer, in the workspace, I see the name of my local machine. should it be different. or is something else an issue.
I was having one package which uses a source query in OLEDB Source Control and fetches the record and a couple of lookups and then an oledb command to insert/update the records in the table using as SP. I changed the source query(Infact the package) and removed in lookup and a different SP was called similar to the old one. But my problem is the package which was before taking only minutes to update 50,000 records is now taking more than 2 hrs. The problem is the number of records it is fetching from the source each time is very less.. its fetching hardly 500 records a time compared to nearly 2500 records before. Where am i going wrong? Any suggestion greatly appreciated.
Hi guys'n'girls... I currently work for a company where we develop several large ASP.NET applications which are VERY data centric. But lately we have run into a problem on our developer DB... On the project I am working on we currenctly have approx. 10 developers working concurrently on the database. That means that we often run into errors caused by two developers working on the same stored procedure, function or trigger so the developer who adds his changes last, overwrites the modifications done by the other developer. The obvious answer is source control for the db, but as far as I can tell this is only available for stored procedures and not for functions or triggers... And even the stored procedure solution isn't very safe because it only works if every developer is editing the procedures through VS. So what do we do? There must be some solution to this problem... And I'm pretty convinced that we are not the first company to face this problem. Are we doing it the wrong way or do you know another solution? Thanks in advance!
We have a large team working on applications to support our internal sales and our public dotcom site. In the process, as you can imagine, we generate a lot of stored procedures and sql scripts going to our dba's for our staging,qa and production environments- but we don't have a solid way to manage it yet. Some people use Source Safe? Does anyone have any successes in this area or recomendations?Thanks!s!Stephen Rylander
Hi, We use a lot of stored procedures within our project and I am looking for a source code/versioning control software that can be used with SQL Server 7.0 to track any changes to these stored procedures. Does anyone have any suggestions?
Hi! I have a strored proc which adds up fields separated by semicolon into a new one and I'd like to use it as a combo box's control source field as a Value list. But it's just insert the whole field into one line like value1;value2;value3 . Is there any way to get these values selectable in the combo box?
There are four well known products that are used by medium to large size shops to help aid in change management of SQL Environments.
- AbaPerls - DBGhost - MSSqlExpress - SQL Source Control
Does anyone currently use any of the above? Could you briefly explain your likes an dislikes and if you have reviewed any of the other options above when you had to make a decision as to which product to use?
I'm looking for a way to keep my database in Subversion so I can maintain it in source control.
Seems like the best way to do this would be to dump the database to a text script file. This works fine for creating the database structure and managing those change, however, that database structure is useless without the actual data in the tables.
Is there a good way to generate the inserts for the actual data? Why isn't this an option in the script wizard.
Also, does anyone have a better idea of source control of SQL Server databases in Subversion?
Look for recommendations for the best product out there to facilitate both source control and code deployment. Typical features I would be looking for are bullet below:
Control object versions Tracking History Automated feature Capture database changes Roll-back feature (should such a thing exist)
Hi,I am trying to put SQL Server Stored Procedures into Sourcesafe as perthe Microsoft Knowledge Base article 818368, but have run into aproblem.The web server is SQL Server 2000 running on Windows 2003 Server. Theclient dev environment is Visual Studio 2003 Enterprise DeveloperEdition.I have carried out the following steps successfully:-1. Installed Sourcesafe client tools on the Server (sourcesafe is onanother server)2. Run the MSSQLServer service under a domain account that has Readand Write access to the Sourcesafe database.3. Added the above user to Sourcesafe using the Administrator tool.4. Installed the VS6 Stored Procedure Version Control components onthe Server5. Enabled Version Control for Stored Procedures on the clientHowever when I right-click on the Stored Proc node in Server explorerI do not get any of the Sourcesafe menu options. They are not greyedout, they are simply not there!Any help would be appreciated.Alternatively if anyone has recommendations for other strategies orother tools to use for this purpose than Sourcesafe then this wouldalso be welcomeKarl
Our team has the following problem: I create a SSIS project in VS and add it to Team Source Control. When the project and all it's files exist on a machine and I want to open the project from Source Control, everithing works fine, but when another developer, who doesn't have the files on his machine, wants to open the project from Source Control he is required to check out the project file.
I've investigated the problem and found out that each project has a database file (with .database extension) and project file contains a reference to it. Once the user opens from Team Source Control a project that isn't presented on a target machine, the VS creates a new database file on a local machine and insists to change the reference in the project file.
We have encountered a problem using source control with reporting services. Im writing this post to find out whether we are doing something wrong, or reporting service just don't store everything in source control.
My problem is as follows. My collegue creates a report with a dataset and this report contains several parameters. He tests this, deploys it, and checks it into the source control through Visual Studio. The following day I get responsibility to alter something in this report. I checks out everything from source control, starts Visual Studio. But... A few important things are missing. The credentials for the dataset for once (this is a minor issue) since these might not should be stored in source control anyways. What is worse is that all the parameter settings are missing. What was entered was a query to a stored procedure where e.g 5 parameters in the report was mapped to parameters in the stored procedure. Now the query has been changed to text type, and the parameter mapping is missing.
This does make it impossible to cooperate on creating reports. If I now make a change in the parameter configuration, my collegue won't receive this when synchronizing source control, and the risk of deploying something incorrect is too high.
Can anyone help enlighten us. Are we doing something wrong? Is there some manual step that needs to be done to ensure that everything is stored in source control? Or is it just something we have to live with, not being able to trust source control when doing Reporting Services?
I have all the config files for my various packages in a folder call configs. It seems that I cannot add folders to the SSIS solution. I can add config files, but they get copied into the root folder, which breaks the directory structure that I have.
Am I missing something? Is there a recommended to manage config files, and other external files used by the SSIS package, in SourceSafe and in the SSIS solution? Thank you.
Hi,I'm developing an application to crypt SQL databases and i need toread SP and Views source code from VB6, if you know how to do thisplease answer me.Greetings.
I have a simple data flow where I am trying to import data from an xml file into a SQL Server table. I have an xsd that seems to work because the XML Source can pick up all the elements in the xml file. The problem is that the process executes successfully without any rows being imported. The xml file has lots of data. But no messages or warnings are given to suggest why no rows are being written to the table.
This is my first time trying to import data from an XML file. It seems wonderfully straightforward. I currently have my Data Flow set up correctly. However, when I try to run my package I get a series of errors. One error is a 0x80131500 which is a very generic error. It say's it's haveing a hard time with a 'Url' field in the XML. The size of the field is set to 255 which should take care of any issues with Truncating. The only issue that I can see with that field is that it contains a query string which of course contains a special '&' XML character (&). When I set the Error Handling to Ignore that Error on that column, it imports just fine, however, NONE of the URL's get inserted. So there must be a problem with every URL in the XML. Here are the error messages I recieved from the Progress section:
[XML Source [1]] Error: The "component "XML Source" (1)" failed because error code 0x80131500 occurred, and the error row disposition on "output column "Url" (59)" specifies failure on error. An error occurred on the specified object of the specified component. [XML Source [1]] Error: The component "XML Source" (1) was unable to process the XML data. Pipeline component has returned HRESULT error code 0xC0209029 from a method call.
----And then alot of DTS.Pipeline errors.
I have done alot of searching for this error in regards to SSIS, but the information is scarce. Any and all help would be greatly appreciated. Thank you for your time in this matter.
P.S. Just started using SSIS last week and I love it! The team did an excellent job!