Impossible To Megere 2 Sources:
Aug 21, 2007
Hello everybody,
I'm trying to create a merge between 2 tables, the first coming from Oracle and the second resident on SQL 2005. The result I'd like to retrieve would be a table composed from the original data contained in the SQL table, update with new or changed rows coming from Oracle (the 2 tables are identical, I'm building an update job..). The final table will be the same table used for data source.
I setup connections and everything seems to works, but when I link the Merge block with the 2 sources blocks, double clickin on the Merge Block, I notice that every SQL table's column is set to "ignore".
When I try to change it, SSiS says:
Failed to set property "OutputColumnLineageID" on input column ...
What's wrong? I've set IsSorted property to True and each column with the righ position...
I've also another question: actually my tables hasn't a "last update" column, so I think the merge "block" can't just update the SQL existing rows but it will add only newest rows. Is that right? How can I easily implement an "update check" in your opinion?
Thanks in advance and sorry for my bad english
View 1 Replies
ADVERTISEMENT
May 7, 2001
I have a table that has three fields:
CATEGORIES
----------
catID
description
parentCatID
Some categories have sub-categories. Therefore, some entries will have null
for parentID while others will point to another category.
I need to select all of the categories, but have them returned in the
correct parent/child order (parents BEFORE children). I can't seem to get this to work correctly. Is this not possible or am I just being stupid?? :)
Thanks for any assistance.
Mike V.
View 5 Replies
View Related
Jan 12, 2005
Hi! all
I need to store the output of two select statement in a Temporal Table inside a storeProcedure. and used them later in a Select statement in the same Procedure
CREATE PROCEDURE [update_Alarm_1]
declare @datetime1 ?????
declare @datetime2 ?????
[SELECT Coming
FROM Student_Log
where datepart(hour, AL_Coming) = 9
and
AL_State = 0 ] = @datetime1
[SELECT Coming
FROM Student_Log
where datepart(hour, AL_Coming) = 9
and
AL_State = 1 ] = @datetime2
[SELECT date_part( 'minute', datetime1 - datetime2 )] = @result
AS UPDATE [Time_Result]
SET [Comment] = @Comment_2
WHERE
( [result] = @result)
Thanks in Advance
View 1 Replies
View Related
Jan 12, 2005
Hi! all
I need to store the output of two select statement in a Temporal Table inside a storeProcedure. and used them later in a Select statement in the same Procedure
CREATE PROCEDURE [update_Alarm_1]
declare @datetime1 ?????
declare @datetime2 ?????
[SELECT Coming
FROM Student_Log
where datepart(hour, AL_Coming) = 9
and
AL_State = 0 ] = @datetime1
[SELECT Coming
FROM Student_Log
where datepart(hour, AL_Coming) = 9
and
AL_State = 1 ] = @datetime2
[SELECT date_part( 'minute', datetime1 - datetime2 )] = @result
AS UPDATE [Time_Result]
SET [Comment] = @Comment_2
WHERE
( [result] = @result)
Thanks in Advance
View 3 Replies
View Related
Mar 12, 2008
First of all, here's a description of the three tables involved in the query:
clients
id
name
services
id
name
clients_services
id
client_id
service_id
As you can imagine, I have a list of clients and each client can have several services assigned to him.
So, I have trying to come up with a query that would allow me to do display the following information inside a DataGridView without the use of any additional code:
I would like to be able to display all the services included in the services table and then, depending on the client that is currently selected, to have each of the services display a checkbox in the DataGridView showing the services currently assigned to that particular client. Something like this:
The services table has the following entries: Research, Consulting, Development, Data Protection and Design
The selected client id is "2"
That client has the following services assigned to him: Development and Design
The DataGridView should then display:
[ ] Research
[ ] Consulting
Development
[ ] Data Protection
Design
Is this possible without writing any code?
View 5 Replies
View Related
Aug 24, 2005
I've created a database : hotelselect * from hotel worksselect * from hotel where dpt='5' doesn't work : generate a errorAnyone has a explanation ?create table hotel ([hoteID] int IDENTITY (5000,1) NOT NULL,[dpt] ntext NOT NULL) ON [primary]
View 3 Replies
View Related
Sep 1, 2004
We currently have a pull transactional subscription running from a remote 'PublicationServer' in another country to our local server.
After restarting our fire wall we get the following error message:
"The process could not execute '{call sp_MSget_subscription_guid(16)}' on 'PublicationServer'."
This message is followed by another error message: "Another distribution agent for the subscription(s) is running.", although nothing was changed to the configuration and no SQL processes were started or restarted.
When we restart the distribution job manually it runs as if nothing happened.
Does anyone know what exactly caused the failure, and how to prevent it ?
Philip
View 1 Replies
View Related
Jul 20, 2006
I've been fighting with this all day there has to be an easy way to do this in a single query:
FOR EACH fac_id, get the INSPECTION_ID of the earliest start_date:
INSPECTION_IDFAC_IDSTART_DATE
3007200406280045662004-07-07
3007200306180025662003-06-25
20082002121901114362002-12-19
30072003020600214582003-02-03
30072003020600314582003-02-05
30072003012100214802003-03-25
30072003012100314802005-02-02
20082003123000114362003-12-30
30072004061600615662004-08-26
30072004061600115662001-08-26
30072004061600515662002-08-26
30072004061600215662003-08-26
30072004061600315662004-08-26
30072004061600415662006-08-26
30072004050400415692004-09-10
DESIRED OUTPUT
INSPECTION_IDFAC_IDSTART_DATE
3007200306180025662003-06-25
20082002121901114362002-12-19
30072003020600214582003-02-03
30072003012100214802003-03-25
20082003123000114362003-12-30
30072004061600115662001-08-26
30072004050400415692004-09-10
Am i missing something...
any help would be greatly appreciated...
View 1 Replies
View Related
Jul 20, 2006
I've been fighting with this all day there has to be an easy way to do this in a single query:
FOR EACH fac_id, get the INSPECTION_ID of the earliest start_date:
INSPECTION_IDFAC_IDSTART_DATE
3007200406280045662004-07-07
3007200306180025662003-06-25
20082002121901114362002-12-19
30072003020600214582003-02-03
30072003020600314582003-02-05
30072003012100214802003-03-25
30072003012100314802005-02-02
20082003123000114362003-12-30
30072004061600615662004-08-26
30072004061600115662001-08-26
30072004061600515662002-08-26
30072004061600215662003-08-26
30072004061600315662004-08-26
30072004061600415662006-08-26
30072004050400415692004-09-10
DESIRED OUTPUT
INSPECTION_IDFAC_IDSTART_DATE
3007200306180025662003-06-25
20082002121901114362002-12-19
30072003020600214582003-02-03
30072003012100214802003-03-25
20082003123000114362003-12-30
30072004061600115662001-08-26
30072004050400415692004-09-10
View 2 Replies
View Related
Jul 23, 2005
Hello there!I am working with MS SQL Server 2000.I have a table function that takes an integer parameter and returns atable, and I can successfully use it like this (passing a literalas a parameter):SELECT * FROM MyTableFunction(1)or like this (passing a variable as a parameter):DECLARE @i AS intSELECT @i = 10...SELECT * FROM MyTableFunction(@i)Now, if I have another function -- a scalar function that returns aninteger, I cannot find a way to use it to specify the parameter valuefor the first function. For example, when I writeSELECT * FROM MyTableFunction( dbo.MyScalarFunction() )SQL Server issues the following complaint:Incorrect syntax near '.'.I am really perplexed: what I am doing wrong?Interestingly, if I re-write the second snippet asDECLARE @i AS intSELECT @i = dbo.MyScalarFunction()...SELECT * FROM MyTableFunction(@i)everything works just fine; however, this trick cannot be used as aworkaround because I need to pass result of one function as a parameterto another inside a view's code -- I cannot declare variables and writeany procedural code...Any ideas, especially workarounds, would be greatly appreciated.Thank you,Yarik.
View 2 Replies
View Related
Sep 23, 2005
Hi all,
I'm Trying to replicate the creation of an "xml" file that is currently created using a C++ application. I want to take that application out of the picture, but need to create the same format XML file because a step later in the production process uses this file, and I cannot change it.
The output format I am looking for is:<?xml version="1.0" encoding="utf-8"?>
<FUNDS>
<AMRGX>
<NAME>AMERICAN GROWTH D</NAME>
</AMRGX>
<AHERX>
<NAME>AMERICAN HERITAGE FUND</NAME>
</AHERX>
<AMRVX>
<NAME>AMERICAN INVESTORS GROWTH FUND</NAME>
</AMRVX>
.
.
.
</FUNDS>The problem I am having is that I cannot seem to get the level/node of the fund symbol (AMRGX, AHERX, and AMRVX in the example above) as it needs to be. I think this must be some non-standard use of XML, since the tag is really the data itself (?)
The closest I have been able to get so far is:
<FUNDS>
<SYMBOL>AMRGX</SYMBOL>
<NAME>AMERICAN GROWTH D</NAME>
</FUNDS>
<FUNDS>
<SYMBOL>AHERX</SYMBOL>
<NAME>AMERICAN HERITAGE FUND</NAME>
</FUNDS>
.
.
.As you can see (hopefully) I am able to get the data I need but cannot get:
(1) the FUNDS tag(s) to be the very highest level/root.
nor (2) the SYMBOL part (tag label?) to be the actual variable stock fund.
Am I 'splaining this well enough? I don't necessarily need all the code, since I know I haven't given enough info to help with that, but my basic question is - - Is it possible to get a variable TAG based on the table DATA?
I want my SYMBOL tag to be the actual SYMBOL for the stock fund.
Confused? Not as much as I am *LOL* I am new to the use of all but XML EXPLICIT use, so any help would be appreciated - at least regarding my two formatting questions.
Yes, I have (and am still) searching around BOL for my answers, but so I have found nothing that helps me out. Meanwhile, suggestions are welcome!
Thanks!
View 6 Replies
View Related
Sep 21, 2006
Hello,I am using SQL Server 2000 with SP4. I have a database with two fullbackups at 4:00 PM and 5:00 PM and a transactional log backup at 5:30PM. Is there a possible way to do a point in time restore to 4:30 PM,that is between two full backups?When I try to use the transactional log backup that is taken at 5:30, Ican never specify a time before 5:00 PM. Is the transaction logtruncated at each full backup? If so, even if you take transactionallog backup every ten minutes, and full backups every once in a while,there will be some point in time which cannot be recovered to, namelythe time between a transactional log backup and a full backup. Take alog backup at 4:50, and full backup at 5:00 and you can never recoverto 4:55, can you?Any insight on the topic will be appreciated,Regards,M. Baris Caglar
View 3 Replies
View Related
Aug 31, 2006
I hope anyone can help me with this. I am having problems connecting to the aspnet database. It
all started when I noticed that I could not log in to my webapplication
anymore under debug mode, although I was able to log in when remotely
accessing the website. I got the error message that the machineaspnet
user did not have access to the database: "Login failed for user
'GM-FEDORSASPNET' "This was highly peculiar and rather annoying so I tried several things to straighten this out, but it only made things worse!I
read that this had to with permissions of the database in question, al
though I could not understand why permissions suddenly had changed. I
tried to change the rights by attaching it to Management Studio Express
and defining an aspnet login, but that failed because a login under
that name was not accepted. I tried to make a copy of aspnet.mdf, delete the original and rename the copy to aspnet.mdf. When that didn't work, I then deleted the aspnet.mdf, counting on it that it would be regenerated automatically, but alas. I located the aspnet_regsql.exe tool to regenerate the database, but got the following error message: System.Web.HttpException:
Unable to connect to SQL Server database. --->
System.Data.SqlClient.SqlException: 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)What can I do?
View 4 Replies
View Related
Aug 17, 2007
I have images on which users may comment. Now I want to sort those images on the amount of comments each image has.I use custom paging in combination with ROW_NUMBERSo I want to sort items in one table based on the number of occurences of that item in another table...I have the following query (which doesnt work):SELECT *FROM(select ROW_NUMBER() OVER (ORDER BY mediaComments DESC) as RowNum,m.title,m.usercode,m.mediaid,mediaComments=(select count(*) from tblMediaComments where mediaid=m.mediaid)FROM tblAlbums a inner join tblMedia m on am.mediaid=m.mediaidleft join tblMediaComments mc on mc.mediaid=m.mediaidWHERE a.showTo=1group by m.title,m.usercode,m.mediaid) as InfoWHERE RowNum between @startRowIndex AND (@startRowIndex + @maximumRows-1)
View 9 Replies
View Related
May 13, 2008
Hi There,
I have a database which I attached to Sql Server 2005 Express (With advanced features) and enabled full text search. I created a FT catalog and FT index on a column and can successfully run the following query:SELECT expertise
FROM faculty_user
WHERE FREETEXT (expertise, 'Berry' )My issue is that full text search requires user instances to be turned off. Simply setting "User Instance=False" over in my web.config's connection string (in VWD) does not solve the problem.I still get the following error and I think it may be caused by my ASPNETDB. I can't find my connection string to ASPNETDB to turn off user instances and I can't diagnose my other connection strings because of it.Generating user instances in SQL Server is disabled
Here is a sample of my other connection strings:
<add name="myConnectionString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|myDatabase.mdf;Integrated Security=True;User Instance=False" providerName="System.Data.SqlClient"/>
From what I understand, I should also not be attaching the database from my connection string like this because it relys on User Instances? I am officially confused! Thanks for reading, -Derek
View 1 Replies
View Related
Mar 7, 2008
I am using the xp_cmdshell to run a batch file that is trying to open the Adobe Acrobat Reader.
When I run the batch file in the command prompt, it opens perfectly.
When I run it in SQL with xp_cmdshell, it returns the contents fine, and I notice it tries to open Acrobat, but it is under the username "system". And I cannot get it to load in a visible area, and for some reason it doesnt seem to load properly under system.
Any ideas? Any Suggestions?
Please advise.
Marco
View 3 Replies
View Related
Jul 24, 2007
When attempting to use the FTP task to download a file from a Mainframe system the task fails stating the filename as invalid because it doesn't begin with a "/".
Adding the slash to the front of the file name causes the mainframe to be unable to locate the file.
Commandline version of FTP.exe mimicks this behavior by working perfectly when the filename has no slash, and being unable to find the file when the slash is present.
Why does microsoft force a filename to start with a "/" and is there a way to make SSIS skip the validation phase for the FTP task?
View 7 Replies
View Related
Mar 21, 2007
Relative newb to SSRS here, but the answer to this question evades me; answers and insight are appreciated.
Report in question is an invoice form. It requires an absolutely bottom-of-page aligned footer that has databound elements.
This is so that whatever page that footer finally appears on will print in such a way that the address will align in a windowed envelope.
Ironically, Books Online gives this exact scenario in explaining headers and footers in SSRS, but they cleverly don't explain how an absolutely bottom-of-page-aligned and data-bound footer can be made to happen. Headers at absolute page top is obviously no problem. Footers at page bottom, not so much.
So, this is not a "page footer"--page footers are employed in the body. Also this footer is databound, so a page footer as it's known in SSRS is out the window anyway.
Most of the time this will print on a single page, but if it breaks to multiple pages, that footer needs to go all the way to the absolute bottom.
I grasp that the "report footer" for SSRS is just what appears at the end of any repeating controls that you've implemented in your body. Because SSRS uses this kind of repeating-control based idiom rather than a section-based idiom as Crystal does, this kind of (what I would consider very basic) positioning control is looking fairly impossible right now.
Among what I've tried:
--Page footer (can't; databound)
--Specifying a page break after the pre-footer controls, and/or a page break before the controls that make up the footer in their properties. This leads to unpredictable results with blank printed pages (as many as 8 for what previews as a 2-page report, how silly is that?).
--Putting in a page-height rectangle as part of the footer (with and without the page breaks mentioned above), with the idea of forcing a basically blank page at the end of the report so that the footer will go to the bottom. SSRS will go ahead and break the page anyway on long elements like that, which again leads to the "footer" being printed in the middle or top of the final page, or whereever it happens to fall.
I may be having to explain to my client that you can't get there from here, and they may have to redesign their report. Does anyone have any insight?
Thank you for your time in reading this.
View 14 Replies
View Related
Mar 4, 2008
Hello,
SQL Server Reporting Services 2005 (SSRS) is installed on Vista Ultimate.
I cannot access to the http://localhost/ReportServer page. IE posts an internal error HTTP 500.0 (after IE required a Windows account).
All the configurations of Reporting Services are OK. In the Log file, there is nothing: the Web Services does not seem to be launched.
By continuing the investigations in IIS 7 (activation of the €śRules of follow-up of the requests having failed€?, I found the error following:
IIS Trace Detail Highlights
No. EventName Details Time
53. MODULE_SET_RESPONSE_ERROR_STATUS Warning
ModuleName="IsapiModule", Notification="EXECUTE_REQUEST_HANDLER", HttpStatus="500", HttpReason="Internal Server Error", HttpSubStatus="0", ErrorCode="Syntaxe du nom de fichier, de répertoire ou de volume incorrecte. (0x8007007b)", ConfigExceptionInfo="" 09:02:33.716
Translation of the french sentence: ErrorCode="Incorrect syntax of the file name, the directory or the volume."
I made a full research on Internet and in the documentation at my disposal and I did not find anything which can advance me towards a beginning of solution€¦
Thank you with all for the assistance which you will be able to bring to me.
View 4 Replies
View Related
Jan 29, 2008
Hye all, running WHS 2008, I try to install SQL Server 2005 with reporting services, but on install, in "components to install" wizard, the reporting services box is hided. I can't check this box :/ Do you know whats wrong ? if anyone knows the problem, thanks in advance.
View 1 Replies
View Related
Feb 9, 2007
Hi everyone,
Can I do an insert with one column value being specified and the others being retrieved? Basically, I have to take an input from the user, join that input with the result of a select (based on that input) and post that to a table
I don’t suppose we can do something like
INSERT destTable(col1, col2, col3….)
Values (col1_value, (Select (…..)))
What do y'all think? Any input/suggestion is appreciated! :)
Thanks,
Gijoo
View 4 Replies
View Related
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
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
Nov 13, 2007
I have around 120 tables. I am using script component to pull the values from oracle stored procedures. I do not want to create 120 source & desitinations in my dataflow. Please advice how can this be possible with one script component and one oledb destination.
I noticed I can add mutiple outputs in 1 script component which makes the script component to work like a dataset (container of different recordsets (tables) ), if I am correct. Can this be redirected to an dynamic oledb connection.
View 14 Replies
View Related
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
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
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
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
Jan 12, 2008
Hi,I have a button that that executes insertion of data into a database. For the data it inserts into one column, the data is located in another database table.As well as this being inserted, I would like more data to be inserted in the same column, which comes from textboxes which are located on the same page as the button that executes the insertion..For example: someone types in information into textboxes, then presses the button. The code behind then inserts the data from the textboxes plus the data from the other table (for which the coding is already done).Here is my current code: public bool [snip](int ProductId) {[snip] command.CommandText = "INSERT INTO Messages (sendername,recievername,message,senddate,subject) VALUES (@sendername,@recievername,@message,@date,@subject)"; command.Parameters.AddWithValue("@sendername", System.Web.HttpContext.Current.User.Identity.Name); DataView dv = SqlDataSource2.Select(DataSourceSelectArguments.Empty) as DataView; string receivername = " " + dv[0]["Usersname"].ToString() + " "; command.Parameters.AddWithValue("@recievername", receivername); DataView dv2 = SqlDataSource3.Select(DataSourceSelectArguments.Empty) as DataView; string message = dv2[0]["paymentinstructions"].ToString(); command.Parameters.AddWithValue("@message", message); command.Parameters.AddWithValue("@subject", TextBox1.Text); command.Parameters.AddWithValue("@date", DateTime.Now); command.ExecuteNonQuery(); con.Close(); command.Dispose(); return true; } So along with "paymentinstructions" being inserted into 'message', I would also like the values from TextBox4, TextBox5 and TextBox6 to be inserted... It would also be good if text could be inserted infront of the values of these textboxes - e.g. Price: "TextBox4's value"Does anyone have any ideas? Reply if it needs further explanation.Thanks,Jon
View 14 Replies
View Related
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
Mar 7, 2002
Is it possible to create a recordset from two different datasources?
Such as
SELECT * FROM DataSource1.TableName WHERE ColumnName IN (SELECT Column FROM Datasource2.TableName)
Thanks.
View 1 Replies
View Related
Mar 7, 2002
Is it possible to create a recordset from two different datasources?
Such as
SELECT * FROM DataSource1.TableName WHERE ColumnName IN (SELECT Column FROM Datasource2.TableName)
Thanks.
View 2 Replies
View Related
Apr 21, 2008
Let say, i've 2 server. Server A having Adb database and Server B having Bdb database.
Adb having tblStaff as follow
ID | Department | Name
------------------------
001 | F41 | James
Bdb having tblDepartment as follow
Department ID | Department Name
-----------------------------------
F41 | Emgineering
F44 | Human Resources
Is it possible to create query between them? Con you consult me. Tq.
View 2 Replies
View Related