Showing posts with label custom. Show all posts
Showing posts with label custom. Show all posts

Wednesday, March 21, 2012

How to include MSDE with Setup of custom applications

I am using VS .NET 2003 Bootstrapper Plug-In to create an
installer that redistribute the .NET Framework 1.1 and
MDAC 2.8 with my application.
How can I include MSDE and provide the switches in order
to install MSDE on clients machine as well?
Thanks
Hi,
Unfortunately, all the auto-install options currently have "issues". I'd
strongly suggest you:
1. Configure the setup.ini file to have your default settings.
2. Get the client to run the setup.exe program to install the MSDE.
HTH,
Greg Low [MVP]
MSDE Manager SQL Tools
www.whitebearconsulting.com
"pankaj banga" <pankaj@.discussions.microsoft.com> wrote in message
news:12f201c4a8db$5d598ab0$a501280a@.phx.gbl...
>I am using VS .NET 2003 Bootstrapper Plug-In to create an
> installer that redistribute the .NET Framework 1.1 and
> MDAC 2.8 with my application.
> How can I include MSDE and provide the switches in order
> to install MSDE on clients machine as well?
> Thanks
|||Thanks HTH,
Then how would I create my tables, stored procs and load
client specific data into tables. Actually I am new to
all this. I read about msde bootstrap installer, are
there issues with it as well?

>--Original Message--
>Hi,
>Unfortunately, all the auto-install options currently
have "issues". I'd
>strongly suggest you:
>1. Configure the setup.ini file to have your default
settings.
>2. Get the client to run the setup.exe program to
install the MSDE.
>HTH,
>--
>Greg Low [MVP]
>MSDE Manager SQL Tools
>www.whitebearconsulting.com
>"pankaj banga" <pankaj@.discussions.microsoft.com> wrote
in message[vbcol=seagreen]
>news:12f201c4a8db$5d598ab0$a501280a@.phx.gbl...
an[vbcol=seagreen]
order
>
>.
>
|||hi,
"pankaj banga" <pankaj@.discussions.microsoft.com> ha scritto nel
messaggio news:230901c4a950$1bb0dcb0$a301280a@.phx.gbl
> Thanks HTH,
> Then how would I create my tables, stored procs and load
> client specific data into tables. Actually I am new to
> all this. I read about msde bootstrap installer, are
> there issues with it as well?
>
Microsoft provides a deployment toolkit, in release candidate at the current
time, you can dowload from
http://www.microsoft.com/downloads/d...displaylang=en
I did not installed it, but I think some database deployment feature are
present... and some drawbacks of this toolkit have been posted here... don't
know the current state and/or the final release...
personally I do deploy apps with a companion tool which will read and
execute DDL scripts as long as INSERT INTO scipts, BCP and so on.. other
ways are backup/restore and sp_attach_db
I already discused these 3 methods of mine in http://tinyurl.com/6ux7p and
http://tinyurl.com/4x8pv ...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
sql

Monday, March 12, 2012

How to import in special character delimited text file by using SSIS ?

Hi,

I would like to know how to import in the custom delimited text file by using SSIS.

For example, instead by using tab or comma delimited, I use this character : '?'

The reason is the delimited format that SSIS provided is too common such as colon, semi colon, tab, comma and pipeline.

I have the data that the user also key in the pipeline there. So I am thinking to separate the field by using this special character, but cannot see if there is anyway to import in by using SSIS.

Please help to share the solution on this :

A?B?C
1?2?3

thanks

best regards,

Tanipar

You can import this as a single column and then use a script transform to cycle through your row and break it down into the appropriate columns. There are various examples of doing this relating to uneven / unbalanced / dynamic number of columns...

http://agilebi.com/cs/blogs/jwelch/archive/2007/05/07/handling-flat-files-with-varying-numbers-of-columns.aspx

|||I am a fan of the approach above Smile, but you can also just use a flat file connection manager. Go to the Columns page in the editor, and put the symbol into the Column Delimiter field. That works fine for me. The approach above is usually only necessary when dealing with flat files with missing columns or delimiters.|||Learn something new every day... I figured since it was a drop down that you could only use the values present, I didn't realize you could type there... Let's just say this approach is MUCH easier :-)

How to import in special character delimited text file by using SSIS ?

Hi,

I would like to know how to import in the custom delimited text file by using SSIS.

For example, instead by using tab or comma delimited, I use this character : '?'

The reason is the delimited format that SSIS provided is too common such as colon, semi colon, tab, comma and pipeline.

I have the data that the user also key in the pipeline there. So I am thinking to separate the field by using this special character, but cannot see if there is anyway to import in by using SSIS.

Please help to share the solution on this :

A?B?C
1?2?3

thanks

best regards,

Tanipar

You can import this as a single column and then use a script transform to cycle through your row and break it down into the appropriate columns. There are various examples of doing this relating to uneven / unbalanced / dynamic number of columns...

http://agilebi.com/cs/blogs/jwelch/archive/2007/05/07/handling-flat-files-with-varying-numbers-of-columns.aspx

|||I am a fan of the approach above Smile, but you can also just use a flat file connection manager. Go to the Columns page in the editor, and put the symbol into the Column Delimiter field. That works fine for me. The approach above is usually only necessary when dealing with flat files with missing columns or delimiters.|||Learn something new every day... I figured since it was a drop down that you could only use the values present, I didn't realize you could type there... Let's just say this approach is MUCH easier :-)

Friday, February 24, 2012

How to implement a custom Order Column?

Hi,
the table look like this:
id, area, areaorder, areatext
1, group1, 1, Group1Text A
2, group1, 2, Group1Text B
3, group2, 1, Group2Text A
4, group2, 2, Group2Text B
We need to be able to keep the order in each group, but also the ability to
insert and update within a group
eg. "INSERT group1, 2, Group1Text NEW" so that it will look like this:
1, group1, 1, Group1Text A
5, group1, 2, Group1Text NEW
2, group1, 3, Group1Text B
The same if we UPDATE "UPDATE SET AreaOrder=1 WHERE ID = 2" (all Order IDs
need to be adjusted to make space I guess).
What would be a good way to go about doing this?
Thanks a lot
PatrickPatrick,see if it helps you
CREATE TABLE #Test
(
col1 INT NOT NULL PRIMARY KEY,
col2 VARCHAR(20),
col3 INT NOT NULL,
col4 VARCHAR(20)
)
INSERT INTO #Test VALUES (1,'group1', 1, 'Group1Text A')
INSERT INTO #Test VALUES (2,'group1', 2, 'Group1Text B')
INSERT INTO #Test VALUES (3,'group2', 1, 'Group1Text A')
INSERT INTO #Test VALUES (4,'group2', 2, 'Group1Text B')
INSERT INTO #Test VALUES (5,'group1', 3, 'Group1Text C')
SELECT * FROM #Test ORDER BY col2
DROP TABLE #Test
"Patrick Wolf" <ppjwolf@.bigfoot.com> wrote in message
news:%23W1JA%23lSFHA.1268@.TK2MSFTNGP14.phx.gbl...
> Hi,
> the table look like this:
> id, area, areaorder, areatext
> 1, group1, 1, Group1Text A
> 2, group1, 2, Group1Text B
> 3, group2, 1, Group2Text A
> 4, group2, 2, Group2Text B
> We need to be able to keep the order in each group, but also the ability
to
> insert and update within a group
> eg. "INSERT group1, 2, Group1Text NEW" so that it will look like this:
> 1, group1, 1, Group1Text A
> 5, group1, 2, Group1Text NEW
> 2, group1, 3, Group1Text B
> The same if we UPDATE "UPDATE SET AreaOrder=1 WHERE ID = 2" (all Order IDs
> need to be adjusted to make space I guess).
> What would be a good way to go about doing this?
> Thanks a lot
> Patrick
>|||The best way to implement this would be a trigger.
Something along the lines of:
CREATE TRIGGER trgi_i_sometable ON some_table INSTEAD OF INSERT
AS
UPDATE sometable s
SET areaorder = areaorder + (SELECT COUNT(*) FROM inserted i
WHERE i.area = s.area AND i.areaorder <= s.areaorder)
INSERT INTO sometable (id, area, areaorder, areatext)
SELECT id, area, areaorder, areatext FROM inserted
CREATE TRIGGER trgi_iu_sometable ON some_table AFTER DELETE
AS
UPDATE sometable s
SET areaorder = areaorder - (SELECT COUNT(*) FROM deleted d
WHERE d.area = s.area AND d.areaorder < s.areaorder)
You can also do this with updates, but that's is going to be a little less
trivial, as you have to take into account rows that swap etc. It would
probably be the easiest if you replaced the one update with a delete and
insert:
CREATE TRIGGER trgi_u_sometable ON some_table INSTEAD OF UPDATE
AS
DELETE s
FROM sometable s
INNER JOIN deleted d
OM s.id = d.id
INSERT INTO sometable (id, area, areaorder, areatext)
SELECT id, area, areaorder, areatext FROM inserted
(You have to test that, because I am not 100 % sure if an instead of trigger
will fire another instead of trigger.)
Jacco Schalkwijk
SQL Server MVP
"Patrick Wolf" <ppjwolf@.bigfoot.com> wrote in message
news:%23W1JA%23lSFHA.1268@.TK2MSFTNGP14.phx.gbl...
> Hi,
> the table look like this:
> id, area, areaorder, areatext
> 1, group1, 1, Group1Text A
> 2, group1, 2, Group1Text B
> 3, group2, 1, Group2Text A
> 4, group2, 2, Group2Text B
> We need to be able to keep the order in each group, but also the ability
> to insert and update within a group
> eg. "INSERT group1, 2, Group1Text NEW" so that it will look like this:
> 1, group1, 1, Group1Text A
> 5, group1, 2, Group1Text NEW
> 2, group1, 3, Group1Text B
> The same if we UPDATE "UPDATE SET AreaOrder=1 WHERE ID = 2" (all Order IDs
> need to be adjusted to make space I guess).
> What would be a good way to go about doing this?
> Thanks a lot
> Patrick
>|||In addition ,I'd create Groups table to be joined with a Group_Text table.
That way you violate 2SF you have a data that not depends on PK.
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23BBkvCmSFHA.3296@.TK2MSFTNGP15.phx.gbl...
> Patrick,see if it helps you
> CREATE TABLE #Test
> (
> col1 INT NOT NULL PRIMARY KEY,
> col2 VARCHAR(20),
> col3 INT NOT NULL,
> col4 VARCHAR(20)
> )
> INSERT INTO #Test VALUES (1,'group1', 1, 'Group1Text A')
> INSERT INTO #Test VALUES (2,'group1', 2, 'Group1Text B')
> INSERT INTO #Test VALUES (3,'group2', 1, 'Group1Text A')
> INSERT INTO #Test VALUES (4,'group2', 2, 'Group1Text B')
> INSERT INTO #Test VALUES (5,'group1', 3, 'Group1Text C')
> SELECT * FROM #Test ORDER BY col2
> DROP TABLE #Test
>
> "Patrick Wolf" <ppjwolf@.bigfoot.com> wrote in message
> news:%23W1JA%23lSFHA.1268@.TK2MSFTNGP14.phx.gbl...
> to
IDs
>|||Thanks very much for your input :)
It seems to work (I programmed another trigger for instead of update).
I have trouble though understanding how this works?
UPDATE sometable s
> SET areaorder = areaorder + (SELECT COUNT(*) FROM inserted i
> WHERE i.area = s.area AND i.areaorder <= s.areaorder)
How is this different from this?
DECLARE @.targetOrder as smallint,@.targetArea as int
SELECT @.targetOrder = areaOrder, @.targetArea=area FROM inserted
UPDATE sometable s SET areaorder = areaorder + 1 WHERE areaorder >=
targetOrder and area = targetArea
Thanks and all the best
Patrick|||My statement works when multiple rows are inserted, while your statement
only works for one row. An insert/delete/update statement can affect
multiple rows, but will only fire the trigger once for the statement, not
once for every row. So you have to write trigger so that they can handle
multiple rows, unless you put in some specific code that rolls back
statements that affect multiple rows, like:
CREATE TRIGGER ....
AS
IF @.@.ROWCOUNT > 1
BEGIN
RAISERROR ('No multirow updates allowed!, 16,1)
ROLLBACK TRAN
RETURN
END
... rest of trigger
but you only need that in rare cases. In most cases you can write the
trigger to handle multirow inserts/updates/deletes.
Jacco Schalkwijk
SQL Server MVP
"Patrick Wolf" <ppjwolf@.bigfoot.com> wrote in message
news:O23HD$uSFHA.1896@.TK2MSFTNGP14.phx.gbl...
> Thanks very much for your input :)
> It seems to work (I programmed another trigger for instead of update).
> I have trouble though understanding how this works?
> UPDATE sometable s
> How is this different from this?
> DECLARE @.targetOrder as smallint,@.targetArea as int
> SELECT @.targetOrder = areaOrder, @.targetArea=area FROM inserted
> UPDATE sometable s SET areaorder = areaorder + 1 WHERE areaorder >=
> targetOrder and area = targetArea
> Thanks and all the best
> Patrick
>|||Thanks very much for your answer.
Since I feel that you got a good point here :) I still have one challenge.
I would like to write these statments myself and I dont totaly understand
how yours works:
Would you mind pointing out how the COUNT(*) works here?

> UPDATE sometable s
Thanks a lot
Patrick
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid> wrote
in message news:u17O7bxSFHA.2812@.TK2MSFTNGP09.phx.gbl...
> My statement works when multiple rows are inserted, while your statement
> only works for one row. An insert/delete/update statement can affect
> multiple rows, but will only fire the trigger once for the statement, not
> once for every row. So you have to write trigger so that they can handle
> multiple rows, unless you put in some specific code that rolls back
> statements that affect multiple rows, like:
> CREATE TRIGGER ....
> AS
> IF @.@.ROWCOUNT > 1
> BEGIN
> RAISERROR ('No multirow updates allowed!, 16,1)
> ROLLBACK TRAN
> RETURN
> END
> ... rest of trigger
> but you only need that in rare cases. In most cases you can write the
> trigger to handle multirow inserts/updates/deletes.
> --
> Jacco Schalkwijk
> SQL Server MVP
>|||Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are. Sample data is also a good idea, along with clear
specifications.
Since there is no such thing in the relational as a magical universal
id, can I assume that you want this column for display purposes, in
violation of the basic principle of a tiered archtiecture? Is the real
key (area, area_order)?
If you keep designing things like this, you will wind up with triggers
(procedural code!!) and Normal Form problems that will destroy your
data integrity.|||Hi,
yes you are right area, areaorder are the real ids. In the real application
area is an int and has foreign key constraint to the parent table which
defines the areas. I just did the sample for simplicity.
The grid I work with has trouble with combined primary keys so it seemed
easier to just use an id column even though it has not much meaning.
Thanks for your suggestions
Patrick
----
---
CREATE TABLE Test3
(
id INT NOT NULL PRIMARY KEY IDENTITY (1,1),
area VARCHAR(10) NOT NULL,
areaorder INT NOT NULL,
areatext VARCHAR(20) NOT NULL
)
INSERT INTO test3 VALUES ('group1', 1, 'Group1Text A')
INSERT INTO Test3 VALUES ('group1', 2, 'Group1Text B')
INSERT INTO Test3 VALUES ('group2', 1, 'Group1Text A')
INSERT INTO Test3 VALUES ('group2', 2, 'Group1Text B')
INSERT INTO Test3 VALUES ('group1', 3, 'Group1Text C')
----
---
"--CELKO--" <jcelko212@.earthlink.net> wrote in message
news:1114612727.507792.92340@.l41g2000cwc.googlegroups.com...
> Please post DDL, so that people do not have to guess what the keys,
> constraints, Declarative Referential Integrity, datatypes, etc. in your
> schema are. Sample data is also a good idea, along with clear
> specifications.
> Since there is no such thing in the relational as a magical universal
> id, can I assume that you want this column for display purposes, in
> violation of the basic principle of a tiered archtiecture? Is the real
> key (area, area_order)?
> If you keep designing things like this, you will wind up with triggers
> (procedural code!!) and Normal Form problems that will destroy your
> data integrity.
>

Sunday, February 19, 2012

How to hide/show parameter dynamic?

There is a date range parameter in my rdl, the list value is "This Week","This Month", "This Year" and "Custom", when user choose "Custom", then display two parameter "Date From" and "Date To" to select custom date range.

My question, how to show "Date From" and "Date To" when user choose "Custom", and will hide these two parameter when user choose other item.

Thanks

You don't say what kind of element Date To and Date From are, but if they are text boxes with lables, you can change their Visible property from "False" to "True" or vice versa, depending on what the user has selected. I suggest that the default poroperty should be False., then make them Visisble if the user chooses "Custom"|||

Thanks for you reply

But the parameter's visible property cannot support formula, and I cannot get the change event of parameter "Date Range", such as selectedIndexChange

I use SRS2005, the "Date Range" is a dropdownlist, "Date From" and "Date To" may be the text box

How to hide/show parameter dynamic?

There is a date range parameter in my rdl, the list value is "This
Week","This Month", "This Year" and "Custom", when user choose "Custom", then
display two parameter "Date From" and "Date To" to select custom date range.
My question, how to show "Date From" and "Date To" when user choose
"Custom", and will hide these two parameters when user choose other item.
I use SRS2005
If cannot design the above function, I want to know, how to set the layout
of 3 parameters as:
Date Range ______
Date From ______ Date To ______
The SRS will display as:
Date Range ______ Date From ______
Date To ______
ThanksIf the parameters values are coming from query byway of datasets then it can
be cascaded so whn you select "custom" then it displayes the from and to
otherwise I suppose it is not possible. when you create 3 parameters then it
displays all 3.
Amarnath
"icyer" wrote:
> There is a date range parameter in my rdl, the list value is "This
> Week","This Month", "This Year" and "Custom", when user choose "Custom", then
> display two parameter "Date From" and "Date To" to select custom date range.
> My question, how to show "Date From" and "Date To" when user choose
> "Custom", and will hide these two parameters when user choose other item.
> I use SRS2005
> If cannot design the above function, I want to know, how to set the layout
> of 3 parameters as:
> Date Range ______
> Date From ______ Date To ______
> The SRS will display as:
> Date Range ______ Date From ______
> Date To ______
> Thanks
>|||Hi
I'd be curious as to your coding behind this. I need to do similar in
giving a list that has predefined dates to be passed except when the user
chooses their own dates.
Thanks
chelle
"icyer" wrote:
> There is a date range parameter in my rdl, the list value is "This
> Week","This Month", "This Year" and "Custom", when user choose "Custom", then
> display two parameter "Date From" and "Date To" to select custom date range.
> My question, how to show "Date From" and "Date To" when user choose
> "Custom", and will hide these two parameters when user choose other item.
> I use SRS2005
> If cannot design the above function, I want to know, how to set the layout
> of 3 parameters as:
> Date Range ______
> Date From ______ Date To ______
> The SRS will display as:
> Date Range ______ Date From ______
> Date To ______
> Thanks
>