Problems Using SSIS W/ Non-SQL Server Data Sources

Mar 12, 2007

I've encountered a few problems using SSIS against non-SQL Server data
sources and was hoping that others might have some experience. Google
searches and browsing MSDN hasn't led me to a solution, so any advice
on the following is appreciated:

1) When using the "Data Source Views" wizard to add a data source
view from an ODBC data source, only tables appear in the object
listing. Views do not. (I've also observed this with SQL Server 2005
databases as well, but it's a bigger issue when you can't use the native SqlClient, as is the case for many ODBC-only databases.) ODBC traces show that both table and
view metadata is being returned to SSIS correctly, so it appears as
though SSIS is filtering out views from the object listing in the
wizard.

2) When creating named queries against (non-SQL Server) ODBC data
sources, SSIS appears to use the SQL Server SQL syntax for referencing
schemas/objects (e.g. "SELECT * FROM [schema].[table]", rather than
"SELECT * FROM schema.table"). This isn't valid SQL in many databases.
Am I missing something? Is there a way to change this through some
configuration setting?

View 2 Replies


ADVERTISEMENT

How SSIS Works With Data Sources Other Than SQL Server?

Oct 2, 2006

Hi:

I am new to SSIS. I would like to know if I want to transfer data from one Oracle schema to another Oracle schema and also to do scheduling of the packages, can I still use SSIS? If yes, what are the components that need to be installed on the database server and the development environment? I hope I don't need the full SQL Server database installation in order to use SSIS.

Thanks!

MuiSukYuen

View 1 Replies View Related

SQL Server 2012 :: ISNULL With Two Data Sources In SSIS

Oct 3, 2014

Currently, I am using T-SQL to combine some data and using an ISNULL function like this:

,ISNULL(H.Last_Name, S.PatientLastName)
,ISNULL(H.First_Name, S.PatientFirstName)

I am wanting to change from using a query to move this data to using an SSIS Data Flow. I am familiar with using Merge Join to combine the two tables (H & S in this case), but I'm not sure where I can use the ISNULL in the manner described above. Is there a way to do it in the Merge Join? Do I have to do it after the Merge Join?

View 3 Replies View Related

Looping Through Several Excel Data Sources In SSIS

May 10, 2006

I am attempting to use the foreach loop structure in an SSIS package toloop through however many Excel files are placed in a directory andthen perform an import operation into a SQL table on each of thesefiles sequentially. The closest model for this that I was able to findin the MS tutorial used a flat file source rather than Excel. Thatinvolved adding a new expression to the Connection Manager that set theconnection string to the current filename, as provided by the foreachcomponent. That works just fine, but when I attempt to apply the samemethod to an Excel source, rather than a flat file source, I cannot getit to work. I see the following error associated with the Excel sourceon the Data Flow page: "Validation error. Data Flow Task: Excel Source[1]: The AcquireConnection method call to the connection manager "ExcelConnection Manager 1" failed with error code 0xC020200." I think thatit's just a matter of getting the right expression, and I thought thatperhaps I should be constructing an expression for ExcelFilePath ratherthan the Connection String, but I have fiddled with it for hours andhaven't come up with something that will be accepted. Has anybody outthere been able to do this, or can perhaps refer me to somedocumentation that contains an example of what I am trying to do?Thanks for any help you can give.

View 1 Replies View Related

SSIS - Data Sources - Configure For Deployment?

Jan 26, 2006

I had posted this in the following pre-existing thread :

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=89737&SiteID=1

Also wanted to start a thread on this to see if I can get some suggestions. Any suggestions on how to do this are appreciated.

--------------------------------------------------------------------

Books-Online quote:

>> In Integration Services, data sources are design-time objects that you use when you build packages in SSIS Designer.


This is indeed the case but why? I would like to see it changed or provide some way of including the data source in some kind of a "solution/project configuration", the same way one can create a "package configuration" right now.

If one can build a project, and create a deployment utility to deploy the entire project (all packages), it is incoceivable why one shouldn't be able to set configurations at a "project" level.

Right now I am having to create package configurations to configure my connection setting for dev/test/prod etc environments. But the trouble is, if I have 10 packages each involving 3 connections in my project, I have only 3 data sources in my project, but come deployment time, I'm having to create 10 package configurations, and set my ConnectionString (which is different for dev/test/prod etc) 30 times during deployment.

If there is a better way to do it, I would like to know. Otherwise, this is what I would like to see in the next SP.

------------------------------------

thanks,

RV

View 9 Replies View Related

SSIS Deploying Error '/Data Sources' Already Exist

Feb 7, 2008

Hi I've not done much work on reporting services before.

I've made a change on my page and i can see the change on the preview its just a drop down list containing the week number.

But i can see to get to deploy these changes when i build my package it builds fine but when i go to deploy it am getting this error message

The item '/Data sources' already exist

View 20 Replies View Related

MULTIPLE DATA SOURCES WITH SAME TABLE SCHEMAS IN SSIS

Apr 2, 2006



Hi,

I have the following scenario: N identical Databases (corresponding to different Fiscal Years, with names <Company Name>.<YEAR>). We want to consolidate the N DBs to a New Datawarehouse.

In SSIS we have designed a Dataflow that reads through a OLE DB Source (Connected to one of the N Databases) and maps to a OLE DB Destination (Connected to the NEW DB).

The question is, how we loop in SSIS through the N identical Connections, so to repeatedly execute the designed Dataflow, each time with a different Connection?

Thanks in Advance,

--Dimitris Doukas

View 3 Replies View Related

SSIS Complex Joins From Seperate Data Sources

Oct 30, 2007



Hi,

I'm trying to replicate a SQL join across two seperate data sources in SSIS. If I were to write SQL to do this, it would be as follows:


SELECT Costs.CostRateEntryId,

Costs.UserId,

Costs.HourlyRate * 8 AS DailyCostRate,

Dates.DateKey,

Dates.ActualDate,

FROM Costs

INNER JOIN Dates ON Dates.ActualDate >= Costs.EffectiveDate AND Dates.ActualDate <= Costs.EndDate


Unfortunately, as the tables 'Dates' and 'Costs' are in two seperate SQL2005 systems, I can't really do this. I was hoping that it could be achieved in SSIS, but I cant seem to find any way that I can do a join that's <= or >=.

Can anyone help?

Thanks
Jeremy

View 7 Replies View Related

SSIS Import And Export Wizard Data Sources

Dec 30, 2005

I'm just beginning to use SSIS (bracing for a steep learning curve due to lack of helpful documentation) and am starting out trying use the Import and Export Wizard.  On the "Choose a Data Source" page there is a dropdown for the Data Source.  I see a list of possible data providers, but not one of "Microsoft OLE DB Provider for ODBC drivers," which is the one I wanted to use because I'm trying to connect to an obscure database.  So I figured that I need to use ".Net Framework Data Provider for Odbc."  Unfortunately, regardless of what I enter for the Connection string or the Dsn or the Driver I invariably get an error, although it's somewhat dependent on that I have entered for those three items.

Either this (when I type in a DSN)

Cannot get the supported data types from the database connection "Dsn=Terrascan_Okanogan_WA".

or this (if I enter a full connection string and a driver)

The operation could not be completed.

------------------------------
ADDITIONAL INFORMATION:

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

of this (if I enter a DSN and a driver)

Cannot get the supported data types from the database connection "Dsn=Terrascan_Okanogan_WA;Driver={SmartWare Driver}".

------------------------------
ADDITIONAL INFORMATION:

Specified cast is not valid. (System.Data)

 

So I have a couple questions.  First, why doesn't "Microsoft OLE DB Provider for ODBC drivers" appear in the list of data sources, and secondly, when using the ".Net Framework Data Provider for Odbc" data source what inputs are expected because whatever I'm doing doesn't seem to work?


 

 

 

View 12 Replies View Related

SSIS : Merging Two Data Sources Data

Jul 9, 2007

Hi guys,

I manage to get the SSIS working. Now I would need to do these tasks.

I first want to get data from 2 different sql servers. What would be the best method to accomplish this? Both are in Sql Server 2005.

Secondly I want to make sure if any of the servers couldn't be found on the network or in any case the getting data task failed for any one of them the package won't continue and an email should be send to an email address.

Thirdly If everything is ok then I should combine both and generate one sequence no for them and save them on to another location and then generate a file with modified values.


Can anyone help me regarding these tasks?



Thank you



Gemma

View 17 Replies View Related

SQL 2012 :: Script In SSIS To Check Data Connections / Sources

Jun 10, 2014

script in SSIS to check data connections/sources and send an email if it fails validation. I found this script online, but I'm not real good with scripting and only VB scripting at that.How can I modify this script or is there another one here that will do what I need. The data connection in question links to Salesforce and will fail validation if the password/security token is invalid.

The reason I need this script is that we have no control over the password changes and need to know if the salesforce team changes the password without informing us.

/* The Script Task allows you to perform virtually any operation that can be accomplished in
* a .Net application within the context of an Integration Services control flow.
*
* Expand the other regions which have "Help" prefixes for examples of specific ways to use
* Integration Services features within this script task. */
#endregion
#region Namespaces
using System;

[code]...

View 9 Replies View Related

How To Optimize Data Import With Huge Volumes And Joins Across Data Sources Not All SQL Server Based?

Jun 7, 2006

I need to periodically import a (HUGE) table of data from an external data source (not SQL Server) into SQL Server, with the following scenarios:
Some of the records in the external data source may not exist in SQL.Some of the records in the external data source may have a different value at different imports, but this records are identified univocally by the same primary key in the external datasource and in SQL Server.Some of the records in the external data source may be the same in SQL.

Due to the massive volume of the import, I would like to import only the records which are different from what I have in SQL Server (cases 1 and 2 above). In fact case 2 is the most critical.

I thought of making a query with a left outer join between the data in the external data source table (SOURCE) and the data in the SQL Server table (DESTIN). The join is done on the respective primary keys (composed keys of up to 10 columns) and one of the WHERE conditions will be that the value in SOURCE is different from the value in DESTIN.

The result of this query would be exactly what I need to import.
How to do this in SSIS??? I couldn't figure out how to join tables in different data sources yet.

In fact I cannot write a stored procedure to do that, since one of the sources is in a datasources not SQL Server.
I have seen the Lookup transformation in this article http://www.sqlis.com/default.aspx?311 but this is not exacltly what I want to do.
Another possibility is to use the merge join, but due to the sorting I believe its performances would be terrible!

Thanks in advance for your suggestions!

View 9 Replies View Related

Referencing Server Data Sources

Jan 14, 2008

Hi,

I have a datasource to an SQL server table which is used in a dataset with the following sql

e.g.

select *
from tblcustomer

I need to join tblcustomer to another SQL table located on a different server and database (datasource)
how would i go about doing this?


I tried the below which failed, anyone can help?

select *
from tblcustomer LEFT JOIN server1.database1.tbluser on server1.database1.tbluser.userid = tblcustomer.userid


View 4 Replies View Related

SQL 2012 :: Moving SRS To A New Server And Changing Data Sources?

Jun 18, 2014

I have a project where I am creating a test environment. My objective is to give the client staff a set of instructions to follow to make sure the test mirrors production. I have migrated the SRS databases over to the new test server. All of the reports are there as is the security but where I run into an issue is the data sources for SRS. They are all pointed at the production servers. Is there an easy way to make the change possibly using a SQL update statement or exporting all the reports to XML and doing a find and replace. The shared data sources I went through manually and changed but there were 40 data sources. Now I realized some of the reports have embedded data connections. There are hundreds of reports to go through.

View 5 Replies View Related

SQL Server 2008 :: OLAP CUBE And Data Sources

Aug 3, 2015

I've

1. Data Warehouse
2. OLAP CUBE in Analysis Services

My question is - If my Data Warehouse is changed (Having Append Data) - My OLAP Cube will have the Append Data?

It's possible, my OLAP Cube always having Append Data if my Data Warehouse is changed? If yes, how to do it without re-deploy and re-process my Analysis Services Project....

View 2 Replies View Related

HowTo Compare Data From 2 Different Db-sources (xls,csv,sql Server, Mysql Server)?

Jan 28, 2008

Hello Guys,

I'm searching for a way to compare informations from one database against another database.

E.g. i want to check if serialnumbers of my first database (eg hardware.xls or hardware.csv ) are already stored in my sql server database.

I know i can use sql querys (Joins) for that task but i don't know how i can access 2 different databases at the same time. Do i need a tool for it? Does Excel is able to compare those data? But how? I'm searching for that thread since 2 days testing with some tools without any success...

So please help...

Kindly Regards...

Be

View 4 Replies View Related

Reporting Services 2000 With SQL Server 2005 Data Sources

Jul 23, 2007

All,



I apologize for not doing the legwork to see if i can answer my own question, but I am close to a loosely planned SQL 2005 migration and don't have time and resources to test my own theories.



Is there a way for a Reporting Services 2000 server to connect to SQL server 2005 databases? I've tried creating a new data source and changing a report to this data source, but it seems like the report is still using the old data source. I'm guessing i might need to register new data providers on the 2000 RS server and then change the existsing data sources.



Ideas?



Thx in advance,



-Peter

View 3 Replies View Related

Copying Table Data From SQL Server 2005 To SQL Server 2000 - Very Slow When Using OLEDB Source And Destination Sources?

May 8, 2006

An SSIS package to transfer data from a DB instance on SQL Server 2005 to SQL Server 2000 is extremely slow. The package uses an OLEDB Source to OLEDB Destination for data transfer which is basically one table from sql server 2005 to sql server 2000. The job takes 5 minutes to transfer about 400 rows at night when there is very little activity on the server. During the day the job almost always times out.

On SQL Server 200 instances the job ran in minutes in the old 2000 package.

Is there an alternative to this. Tranfer Objects task does not work as there is apparently a defect according to Microsoft. Please let me know if there is any other option other than using a Execute 2000 package task or using an ActiveX Script to read records from one source and to insert them into the destination source, which I am not certain how long it might take and how viable will that be?

Any inputs will be much appreciated.

Thanks,

MShah

View 5 Replies View Related

SQL Server 2005 - Reporting Services Data Sources Named Pipes VS TCP/IP

Feb 28, 2007

Can anyone shed light on why I cannot get away from named pipes in my SQL2005 Reporting Services Data Sources? Can it not just use TCP/IP? My configuration uses two servers, one in which the reportserver is setup on, and another which hosts the database that is reported against. We are trying to avoid having to open up named pipes on the server that stores the data.

Any help would be appreciated.



An error has occurred during report processing.


Cannot create a connection to data source 'wc_datasource'.



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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)








Thanks!

View 1 Replies View Related

Using Other Editions Of SQL Server For Report Data Sources And/or The Report Server Database Is Not Supported In This Edition Of Reporting Services

Sep 9, 2006

Hi My project is in .NET 2003 i.e. framework 1.1 and database in SQLServer 2000. But the reports have been developed using SQLServer 2005 Reporting Services. Now when I am trying to deploy them through deployment project of .NET its giving me following error:"Using other editions of SQL Server for report data sources and/or the report server database" is not supported in this edition of Reporting Services.  Now I am really confused with this. Can any one please guide me regarding this ASAP. Thanks, Falguni   

View 4 Replies View Related

Selecting A Single Data Source From Multiple Data Sources

Aug 4, 2006

Hi,

I am pretty new to SSIS. I am trying to create a package which can accept data in any of several formats. i.e. CSV, Excel, a SQL Server database/table and import the data into my destination database.

So far i've managed to get this working OK. However I am now TOTALLY stuck. I'm currently trying to just concentrate on the data sources being a CSV (using a Flat File Data Source) and/or an Excel Spreadsheet.

I can get the data in and to my destination using a UNION ALL component and mapping the data sources to it so long as both the CSV file and the Excel spreadsheet exist.

My problem is that I need my package to handle the possibility that only the CSV file might exist and there is no Excel spreadsheet. In which case i'd like the package to ignore the Excel datasource completely. Currently either of my data sources do not exist I get errors and the package terminates.

Is there any way in SSIS that I can check all my data sources to see which ones exist (i.e. are valid). If they exist I want to use them. If it doesn't exist i'd like to disgard it (without error - as long as there is a single datasource the package should run)

I've tried using the AcquireConnection method in a script task on each of my connections, hoping that it would error if the file/datasource did not exist. It doesn't though (in the case of an Excel datasource it just creates a empty excel file for me).

The only other option I can come up with are to have seperate packages depending on the type of data we want to import and then run a particular package depending on the format of the source data. This seems a bit long winded. I am pretty sure I must be able to do what I want to achieve but I can't work out how.

I'll be grateful to anyone who can send me any tips/hints/links on how I can achieve this.

Many thanks

Rob Gibson

View 5 Replies View Related

Remote Access To Report Data Sources And/or The Report Server Database Is Not Supported In This Edition Of Reporting Services.

Apr 24, 2006

I'm using SQL Express with Advance Services & I get this error when I try to deploy my reports. Why do I get this error

An error has occurred during report processing. (rsProcessingAborted)

Cannot create a connection to data source 'EDPSYS'. (rsErrorOpeningConnection)

The feature: "Remote access to report data sources and/or the report server database" is not supported in this edition of Reporting Services. (rsOperationNotSupported)

Justin Song

View 4 Replies View Related

Best Practice - Data Sources And Data Views Vs OLE DB Source

Feb 26, 2008

Hi, i'm wondering which is the best way to search data in a SQL Server.
I reach data using Data Sources and Data Views and also with OLE DB Source with a Data access mode: Named query.
I have to write the data into a Flat File. So, does any one knows which is the best practice for this? Or any one of the two are good choices?
Thanks for your help.

Beli

View 6 Replies View Related

Single Report With The Data From Multiple Data Sources

Jan 9, 2007

Hi,

In my project i want a report. In that report data is getting from more than one data sources(systems). While creating data source view i used named query for both primary and secondary data source. But at the time of crating "Report Model" i am getting below error.

An error occurred while executing a command.
Message: Invalid object name 'Table2'.
Command:
SELECT COUNT(*) FROM (SELECT SerialNum, ModelNum AS com_model
FROM Table2) t



Is there any way to create a report with multiple data sources?

View 8 Replies View Related

Importing Data From Various Data Sources With Non Standard Formats

Mar 19, 2007

Hi all :)

I'm wondering if SSIS will be the solution to the problem I'm working on.

Some of our customers give us an Excel sheet with data they want to insert or update in the database.

I've created a package that will take an Excel sheet, do some data conversion so the data types match up and after that I use a Slowly Changing Data component to create the insert/update commands.

This works great. If a customer adds a new row to the Excel sheet or updates an existing row changes are nicely reflected in the database.

But now I€™ve got the following problem. The column names and the order of the columns in the Excel sheet are not standard and in the future it could happen a customer doesn't even use an Excel sheet but something totally different.

Can I use SSIS for this? Is it possible to let the user set the mappings trough some sort of user interface? I€™ve looked at programmatically creating the package but I€™ve got to say that€™s quit hard to do€¦ It would be easier to write the whole thing myself than to create the package trough code ;)

If not I thought about transforming the data in code before I pass it on to the SSIS package in something like XML. That way I can use standard column names and data types.

So how should I solve this problem? Use SSIS or not?

Thnx :)

Wouter de Kort

View 6 Replies View Related

Remove All Reports ( Not Data Sources) From Reports Server

Jan 23, 2007

Hi does anyone know how to do the above with out going through reportserver url?

Preferably by using a cmd tool ? such rs.exe

or through the backend in the reportserver DB?

Thanks

Dave

View 2 Replies View Related

Different Data Sources

Feb 21, 2008

Hi i have data on a Server in a different database which i like to access from within my ssis job.

I just need to look up information from one table on this database so i can references it. Is there a way of doing this is SSIS. Rather then me having to load the data from one database to another as the data may change.

i tried having 2 sources of data feed into a look up but that does not work..

View 1 Replies View Related

Data Sources

Apr 1, 2008

Hi there,

On my home page I have several different folders to reports which require different data sources. the problem is that within these folders there are multiple copies of the same datasource. is it possible to store all of the datasources in one folder, one location? it would certainly be easier when changes to usernames and passwords need to be modified!

Thanks,
Rhonda

View 4 Replies View Related

Data Sources

Apr 4, 2008



I searched and read about Data Sources and I'm seeing that there is no advantage in using it, which is what I found from playing around with it.

I expected that you would set a global connection in Data Sources and somehow link this to the things in your Connection Manager, giving you one place to switch from one environment to another. But reading the discussions here and playing around with it, this is not the case.

So, why is it there?

Next question.... another thing I gathered so far is something called "Configurations" that will do what I was describing above. Where do I do this?

View 8 Replies View Related

Var For Data Sources

Jun 28, 2007

Hi,



how can i use var for Data Sources ,



my project have to be suitable for the QA system and the production system and i want to connect them by var or something else.

if you have another idea about this subject i'll happy to read.



thanks,

gil.

View 8 Replies View Related

One Or Two Data Sources?

Jun 12, 2007

I'm trying to combine two reports I've created into a form letter. The goal is to have a letter that indicates the students maximum UBSCT score for Math, Reading and Writing. Also in the letter we want to include the student's total number of credits awarded and overall GPA. I not sure if I need to try and combined the two queries or use two different data sources in Reporting Services. I've tried creating one sql statement but the grouping are giving me fits. I fairly new to Reporting Services.

Report 1:

704 Dixie High 11 311880 Student_1 UBSCT Math 176
704 Dixie High 11 311880 Student_1 UBSCT Reading 182
704 Dixie High 11 311880 Student_1 UBSCT Writing 173
704 Dixie High 11 311881 Student_2 UBSCT Math 168
704 Dixie High 11 311881 Student_2 UBSCT Reading 172
704 Dixie High 11 311881 Student_2 UBSCT Writing 165

SELECT
track.schoolc as School_Code,
school.schname as School,
stustat.graden as Grade,
studemo.ident as Ident,
RTRIM(studemo.lastname) + ', ' + RTRIM(studemo.firstname) AS [Student],
stutscors1.testc as Test_Code,
left(zsubtest1.descript,20) as [Subject],
max(stutscors1.testscore) as Score

FROM
stutscors1 INNER JOIN
stutests1 ON stutscors1.ststuniq = stutests1.ststuniq INNER JOIN
studemo ON stutests1.suniq = studemo.suniq INNER JOIN
stustat ON studemo.stuuniq = stustat.stuuniq INNER JOIN
track ON stustat.trkuniq = track.trkuniq INNER JOIN
school ON track.schoolc = school.schoolc INNER JOIN
testdef1 ON stutests1.testuniq = testdef1.testuniq INNER JOIN
zsubtest1 ON stutscors1.subtestc = zsubtest1.subtestc and stutscors1.testc = zsubtest1.testc

WHERE
stutscors1.testscore <> ' ' and
stutscors1.testscore <> '0' and
school.schname = 'Dixie High'and
stutscors1.testc = 'UBSCT' and
stustat.graden = 11

GROUP BY
track.schoolc,
school.schname,
studemo.ident,
RTRIM(studemo.lastname) + ', ' + RTRIM(studemo.firstname),
stustat.graden,
stutscors1.testc,
zsubtest1.descript

---------------------------------------------------------------------------------
Report 2:

704 Dixie High 11 Student_1 311880 23.2500 23.2500 87.50300000 3.763569
704 Dixie High 11 Student_2 311881 20.2500 20.2500 76.84300000 3.794716

select
stugrp_active.schoolc as School_Code,
school.schname as School,
stugrp_active.graden as Grade,
rtrim(stugrp_active.lastname) + ', ' + rtrim(stugrp_active.firstname) as Student,
trnscrpt.suniq as Ident,
sum(trnscrpt.gpacratt) as CreditAtt,
sum(trnscrpt.gradcrawd) as CreditAwd,
round(sum(case when Trnscrpt.GpaCrAtt is null then 0 else Trnscrpt.GpaCrAtt end * gpamarks.gpavallvl0),3) AS TrmGpaPts,
(round(sum(case when Trnscrpt.GpaCrAtt is null then 0 else Trnscrpt.GpaCrAtt end * gpamarks.gpavallvl0),3))/(sum(trnscrpt.gradcrawd)) as GPA

from
dbo.trnscrpt
inner join dbo.stugrp_active on (trnscrpt.suniq = stugrp_active.suniq) INNER JOIN school ON stugrp_active.schoolc = school.schoolc INNER JOIN
gpamarks ON trnscrpt.marksetc1 = gpamarks.marksetc AND trnscrpt.markawd1 = gpamarks.mark

where
school.schname = 'Dixie High' and
stugrp_active.graden = 11 and
trnscrpt.graden >= 9

group by
stugrp_active.schoolc,
school.schname,
stugrp_active.graden,
rtrim(stugrp_active.lastname) + ', ' + rtrim(stugrp_active.firstname),
trnscrpt.suniq

View 2 Replies View Related

300 Data Sources... Am I Doing Something Wrong?

May 15, 2007

In brief, here is my quandary… I have a GridView on a page with some radio buttons, a couple of check boxes, some drop downs etc. And depending on what the user selects the Grid View needs to show different columns from the database…
The easiest way I have found to do this is to have a separate Data Object for each “view�, i.e. each variation of the checkboxes and radio buttons (which determine which dropdowns to use for the variables) and then bind the GridView to the specific Data Source at runtime…
 
It seemed like a good idea at the time, but now I have over 7 different data connections cluttering up the design view, and more to come and I feel like I am missing a better way to achieve the same results…
 
Does anyone have some advice for a major novice?
 
Here’s the beginning of a large set of nested ifs, if this is the way it’s done that’s fine too, I’ll just keep creating data sources, I just get the feeling there must be an easier way to do this..
 
    protected void Button1_Click1(object sender, EventArgs e)
    {
      
 
         if (RadioButtonList1.SelectedValue == "Vendor") {
 
                if (CheckBox1.Checked == true) {
                      GridView2.DataSourceID = "ObjectDataSource4";
                      GridView2.DataBind();
                      TextBox1.Text = "Search";
                } else {
                GridView2.DataSourceID = "ObjectDataSource1";
                GridView2.DataBind();
                TextBox1.Text = "Search";
                }
                } else if (RadioButtonList1.SelectedValue == "Store Number")
            {  GridView2.DataSourceID = "ObjectDataSource2";
                GridView2.DataBind();}
            else {
                GridView2.DataSourceID = "ObjectDataSource3";
                GridView2.DataBind();
                TextBox1.Text = "Search";
            }
               
 
    }
 
Any advice for a major novice would be greatly appreciated! Thanks!
 

View 5 Replies View Related

Bad Practice For Data Sources?

Feb 27, 2006

I'm just wondering if it is bad programming practice to have many data sources on one page. I need a "Matrix" type of page that grabs data from many tables and so far I have 5 data sources. Is this common or is there something I should be doing to make it more efficient?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved