Showing posts with label application. Show all posts
Showing posts with label application. Show all posts

Friday, March 30, 2012

Protect Data and Schema SQL SERVER 2005 EXPRESS

We have a commercial VB.NET winforms client/server application that utilizes SQL Server 2005 express edition. The schema and data that the application utilizes is proprietary and could be very damaging if it got into a competitors hands.

Is there any way to protect the data and schema of a sql server 2005 express edition database?

Will this functionality ever be added?

Thanks

As long as youhand over the database to someone, he will have full control over the database, attaching it to its own server and reading the schema from the database. What you can do is to encrypt data as well as stored procedures with certificates. But the schema won′t be hideable as the database will be given to the other party.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.desql

Pros and Cons

Hi,
I'm writing a proposal for a DR solution for a SQL based application. I've
been looking at clustering, database mirroring, etc. Has anyone come across
any documentation discussing the pro's and cons of the various options
available?
Thanks
Clustering has a distance limitation. Database mirroring is not scalable
beyond 10 or so databases but has no clustering limitation. Clustering
requires expensive hardware. Database Mirroring does not. Database
Mirroring is available on developer and Enterprise and above versions of SQL
Server 2005. Clustering is available on EE versions of SQL 7 and above, and
also on SQL Server Standard in SQL 2005.
Database Mirroring does add some latency to each transaction and as it is
hostbased it works best for low loads on SQL Server. If you have high cpu
utilization your database mirroring solution is likely to fail.
You neglect to mention log shipping and replication in your list of DR
solutions. Both of these word well as well. Log shipping does increase your
exposure to data loss, and is not really scalable beyond a certain size and
number of databases. Replication replicates on an object level and has no
limitation. Failback can be complex.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Hardmandez" <Hardmandez@.discussions.microsoft.com> wrote in message
news:F2DB4016-3D90-4438-B49D-B7B4F76CE03D@.microsoft.com...
> Hi,
> I'm writing a proposal for a DR solution for a SQL based application.
> I've
> been looking at clustering, database mirroring, etc. Has anyone come
> across
> any documentation discussing the pro's and cons of the various options
> available?
> Thanks
>
|||Also check out Stretch Clustering, which can be configured for SQL Server
failover clusters. This can extend the distance limitation mentioned
previously.
http://www.microsoft.com/technet/prodtechnol/sql/2000/deploy/hasog05.mspx
Anthony Thomas
"Hardmandez" <Hardmandez@.discussions.microsoft.com> wrote in message
news:7E081208-21B9-43D1-A241-A2B15E118575@.microsoft.com...
> Thanks for that Hilary, some good points there. Still to get to log
shipping
> and replication in my proposal. SQL isn't really my area of expertease so
> one more question, does SQL come with replication capabilities out of the
box[vbcol=seagreen]
> or when you talking about replication are you refering to products like
> Neverfail?
> "Hilary Cotter" wrote:
SQL[vbcol=seagreen]
and[vbcol=seagreen]
is[vbcol=seagreen]
cpu[vbcol=seagreen]
your[vbcol=seagreen]
and[vbcol=seagreen]
no[vbcol=seagreen]
|||I also have heard that rumor that Neverfail licenses their replication
from DoubleTake, however, this post from the VP of Product Management
from Neverfail denies that is the case. How long ago did Neverfail
tell you they licensed from DoubleTake? I suppose it may have been
true at one point, but apparently no longer.
[url]http://groups.google.com/group/microsoft.public.sqlserver.server/browse_thread/thread/375548336a1c2343/f7328f5f4ef3dfc1?lnk=st&q=Neverfail+DoubleTake&rnu m=5&hl=en#f7328f5f4ef3dfc1[/url]
If you ever compare the two products in terms of performance of the
replication, I think you will find that Neverfail's replication is much
more efficient. It is surprising that DoubleTake, being one of the
oldest data replication products around, really is behind everyone else
in terms of performance of their replication IMHO.
David A. Bermingham, MCSE, MCSA:Messaging
Senior Systems Engineer
www.steeleye.com
Hilary Cotter wrote:[vbcol=seagreen]
> Hi David.
> Last time I spoke with Neverfail they told me they licensed their technology
> from Doubletake. You are correct about DFS and Doubletake. My mistake, DFS
> does provide very similar services to Doubletake, and in some cases DFS is a
> better choice than Doubletake (for example in file replication).
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "daveberm" <david.bermingham@.steeleye.com> wrote in message
> news:1161871846.621466.57800@.m7g2000cwm.googlegrou ps.com...

Proprietary data in SQL2005

I'm trying to understand what I can do to protect proprietary data in SQL
2005. I have an application that currently uses Paradox and I plan to move
it to SQL 2005. Most users will start off with SQL 2005 Express, but will
eventually move to a 'full' version of SQL Server. Paradox allows me to
encrypt whole tables. I know it's not very good security because someone
can still do memory dumps etc. but in combination with licensing agreements
it's probably sufficient in my case to protect proprietary data stored in
the database. Can I achieve something similar in SQL 2005?
I see that I can encrypt data in specific columns, but I'm guessing that
those columns can't be indexed? (Or if they were indexed, it would have to
be the encrypted values rather than the original unencrypted values that
would actually be indexed thus making the indexing less useful)? It doesn't
seem like there's any way to encrypt a whole table?
In some of the stuff I've read, I get the sense that if I create a named
instance of a new SQL Server (Standard or Express), I can set up my instance
to only use SQL Authentication. Then I can prevent the Computer Admin of
the machine where SQL Server is installed from using his/her Windows
Authentication to access the database or named instance of the server. The
only way to configure the server or it's databases would be to know the SA
password and use SQL Authentication to log into the SQL server instance. Is
this correct? And, what does this gain me? How hard would it be to take
the database from my named instance and move it to a different SQL Server
Instance and then gain access to it?Hi,
Thanks for using Microsoft Online Managed Newsgroup.
From your description, I understand that:
You wanted to know:
1. if you can encrypt a whole table in SQL Server 2005;
2. if you can set up your SQL Server instance only use SQL Authentication;
3. how you can move your database from your named instance to a different
SQL Server instance and gain access to it.
If I have misunderstood, please let me know.
For your first question, by now there has been no such setting to encrypt a
whole table in SQL Server. You can encrypt a particular column in a table
by using a key or a certificate. You may refer to:
Improving Data Security by Using SQL Server 2005
http://www.microsoft.com/technet/it...tsec.mspx#EYAAC
For your second question, I would like to let you know that SQL Server has
only two authentication mode: one is Windows Authentication mode; the other
is Mixed Authentication mode (include Windows Authentication and SQL
Authentication). So Windows authentication will be always used by SQL
Server. Any trusted connections or local users can access your SQL Server,
however they will not have permissions to access databases if they are not
members of local administrators group and if you do not assign permissions
to them.
For your last question, I recommend that you:
1. Fully backup all of your user databases and logs;
2. Restore the databases to your new SQL Server instance;
3. Transfer SQL Server logins and passwords to the new SQL Server instance.
Please refer to:
How to transfer logins and passwords between instances of SQL Server
http://support.microsoft.com/kb/246133/en-us
Also, I strongly recommend that you refer to this article for more
information:
How to move databases between computers that are running SQL Server
http://support.microsoft.com/kb/314546/en-us
Besides, for SQL Server 2005 instance, you can also use Copy Database to
move the databases:
Using the Copy Database Wizard
http://msdn2.microsoft.com/en-us/library/ms188664.aspx
If you are very concerned with the table level encryption, I recommend that
you give Microsoft feedback via the link:
https://connect.microsoft.com/SQL
Your feedback will be routed to SQL team so that this feature will probably
be included in the next release.
Look forward to your reply. If you have any other questions or concerns,
please feel free to let me know. It is my pleasure to be of assistance.
Charles Wang
Microsoft Online Community Support
========================================
==============
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from this issue.
========================================
==============
This posting is provided "AS IS" with no warranties, and confers no rights.
========================================
==============|||Hi,
What is everything going on? Please feel free to let me know if you need
further assistance.
Have a great day!
Sincerely yours,
Charles Wang
Microsoft Online Community Support

Monday, March 26, 2012

Proper table structure and SQL Server limits

Hello all,
I am migrating a Paradox application to SQL Server. My problem is that the
existing Paradox table structure is limited. Correcting it will mean a
re-write of the application (Delphi app). Although the record and column
limits are higher in SQL Server, it will eventually hit the wall. So I was
wondering if anyone could offer advise on how we might do this best...
The application is essentially an evaluation tool. It is very generic and
can evaluate anything from buying a digital camera or laptop, to purchasing
a house. All the attributes of whatever it is being measure (the
attributes) are defined as a new column.
Example: let's say you are evaluating laptops. The core table may look like
this:
Fields:
1) Identifier
2) Processor Speed
3) Processor Cache
4) Hard Disk Size
5) LAN connection
6) Cost
So in this table, there are 5 things being measure, 6 columns in total. A
record might look like this:
Field Data:
Identifier | Speed | Cache | HD Size | LAN | Cost ...
HP | 3ghz | 2mb | 60G | Wireless | $2000
So you can see that this structure will hit the wall eventually as more and
more criteria are added. With Paradox, the max number of columns is 255. In
SQL Server this is 1024. Of course there is also a maximum record size. For
SQL Server this is 8060 bytes.
What I'd prefer is a structure that has no limits on how big it can be. In
short, I need a new table structure that is long and skinny, vs very wide
(or fat):
Fields:
Identifier
Attribute
Value
So using the above example, the data might look like:
Field Data
Identifier | Attribute | Value
HP | Speed | 3ghz
HP | Cache | 2mb
HP | HD Size | 60G
HP | LAN | Wireless
HP | Cost | $2000
Obviously this structure is preferred because now I won't hit any column or
record limits, but it makes just about everything else in the application
more difficult. Fundamentally data validation becomes difficult
In the above example, how would one define this structure?
Identifier varchar(50)
Attribute varchar(50)
Value ' <-- here lies my problem!!!
In some cases "value" would be an integer, sometimes numeric, sometimes
text. So then I figured, well I could have a number of tables as above,
each for the various data types, integers, numbers, free form text, etc.
Example:
For Integer data
Identifier varchar(50)
Attribute varchar(50)
Value integer
For floating point data
Identifier varchar(50)
Attribute varchar(50)
Value numeric
For free-form data
Identifier varchar(50)
Attribute varchar(50)
Value varchar or ntext
So now I have taken what was in one table, and split it across 3 or more
tables. Of course, all this data would need to be "re-connected" in a grid
like fashion so it looks like just one row of data to the client again.
It all seems to be getting very messy - to simply overcome a column/row
size limitation. Surely there must be an eloquent way to do something like
this?
thanx very much for any input.
regards,
-randall sell"Randall Sell" <randall@.bytewise.nospam.com.au> wrote in message
news:lsjYc.12329$D7.11613@.news-server.bigpond.net.au...
> Hello all,
> I am migrating a Paradox application to SQL Server. My problem is that the
> existing Paradox table structure is limited. Correcting it will mean a
> re-write of the application (Delphi app). Although the record and column
> limits are higher in SQL Server, it will eventually hit the wall. So I was
> wondering if anyone could offer advise on how we might do this best...
>
. . .

> So now I have taken what was in one table, and split it across 3 or more
> tables. Of course, all this data would need to be "re-connected" in a grid
> like fashion so it looks like just one row of data to the client again.
> It all seems to be getting very messy - to simply overcome a column/row
> size limitation. Surely there must be an eloquent way to do something like
> this?
>
You have pretty much worked through he issues here. And you're right: the
free-form attribute storage is a pain to manage, has no data integrity and
performs terribly. I'll just add that it's also not what relational
databases are _for_. An RDBMS is designed to model data using relations. A
relation is a tuple of related values, like
( HP, 3ghz, 2mb, 60G, Wireless, $2000 )
So the original design is the correct one. Mainly for performance reasons,
SqlServer puts a limit on the size of rows (in bytes and in number of
columns). If you really run out of room, you can always just create a
second table, and a third, etc which have a one-to-one relationship with
your original table.
David|||Now why didn't I think of that? That is the sort of input I was looking
for. It would also have some problems, such as creating dynamic queries and
not knowing which table contains a field, but the meta data should sort
that out, so it should be manageable.
thanx
-randall
David Browne wrote:
> So the original design is the correct one. Mainly for performance reasons
,
> SqlServer puts a limit on the size of rows (in bytes and in number of
> columns). If you really run out of room, you can always just create a
> second table, and a third, etc which have a one-to-one relationship with
> your original table.
> David
>

Proper table structure and SQL Server limits

Hello all,
I am migrating a Paradox application to SQL Server. My problem is that the
existing Paradox table structure is limited. Correcting it will mean a
re-write of the application (Delphi app). Although the record and column
limits are higher in SQL Server, it will eventually hit the wall. So I was
wondering if anyone could offer advise on how we might do this best...
The application is essentially an evaluation tool. It is very generic and
can evaluate anything from buying a digital camera or laptop, to purchasing
a house. All the attributes of whatever it is being measure (the
attributes) are defined as a new column.
Example: let's say you are evaluating laptops. The core table may look like
this:
Fields:
1) Identifier
2) Processor Speed
3) Processor Cache
4) Hard Disk Size
5) LAN connection
6) Cost
So in this table, there are 5 things being measure, 6 columns in total. A
record might look like this:
Field Data:
Identifier | Speed | Cache | HD Size | LAN | Cost ...
HP | 3ghz | 2mb | 60G | Wireless | $2000
So you can see that this structure will hit the wall eventually as more and
more criteria are added. With Paradox, the max number of columns is 255. In
SQL Server this is 1024. Of course there is also a maximum record size. For
SQL Server this is 8060 bytes.
What I'd prefer is a structure that has no limits on how big it can be. In
short, I need a new table structure that is long and skinny, vs very wide
(or fat):
Fields:
Identifier
Attribute
Value
So using the above example, the data might look like:
Field Data
Identifier | Attribute | Value
HP | Speed | 3ghz
HP | Cache | 2mb
HP | HD Size | 60G
HP | LAN | Wireless
HP | Cost | $2000
Obviously this structure is preferred because now I won't hit any column or
record limits, but it makes just about everything else in the application
more difficult. Fundamentally data validation becomes difficult
In the above example, how would one define this structure?
Identifier varchar(50)
Attribute varchar(50)
Value ' <-- here lies my problem!!!
In some cases "value" would be an integer, sometimes numeric, sometimes
text. So then I figured, well I could have a number of tables as above,
each for the various data types, integers, numbers, free form text, etc.
Example:
For Integer data
Identifier varchar(50)
Attribute varchar(50)
Value integer
For floating point data
Identifier varchar(50)
Attribute varchar(50)
Value numeric
For free-form data
Identifier varchar(50)
Attribute varchar(50)
Value varchar or ntext
So now I have taken what was in one table, and split it across 3 or more
tables. Of course, all this data would need to be "re-connected" in a grid
like fashion so it looks like just one row of data to the client again.
It all seems to be getting very messy - to simply overcome a column/row
size limitation. Surely there must be an eloquent way to do something like
this?
thanx very much for any input.
regards,
-randall sell"Randall Sell" <randall@.bytewise.nospam.com.au> wrote in message
news:lsjYc.12329$D7.11613@.news-server.bigpond.net.au...
> Hello all,
> I am migrating a Paradox application to SQL Server. My problem is that the
> existing Paradox table structure is limited. Correcting it will mean a
> re-write of the application (Delphi app). Although the record and column
> limits are higher in SQL Server, it will eventually hit the wall. So I was
> wondering if anyone could offer advise on how we might do this best...
>
. . .
> So now I have taken what was in one table, and split it across 3 or more
> tables. Of course, all this data would need to be "re-connected" in a grid
> like fashion so it looks like just one row of data to the client again.
> It all seems to be getting very messy - to simply overcome a column/row
> size limitation. Surely there must be an eloquent way to do something like
> this?
>
You have pretty much worked through he issues here. And you're right: the
free-form attribute storage is a pain to manage, has no data integrity and
performs terribly. I'll just add that it's also not what relational
databases are _for_. An RDBMS is designed to model data using relations. A
relation is a tuple of related values, like
( HP, 3ghz, 2mb, 60G, Wireless, $2000 )
So the original design is the correct one. Mainly for performance reasons,
SqlServer puts a limit on the size of rows (in bytes and in number of
columns). If you really run out of room, you can always just create a
second table, and a third, etc which have a one-to-one relationship with
your original table.
David|||Now why didn't I think of that? That is the sort of input I was looking
for. It would also have some problems, such as creating dynamic queries and
not knowing which table contains a field, but the meta data should sort
that out, so it should be manageable.
thanx
-randall
David Browne wrote:
> So the original design is the correct one. Mainly for performance reasons,
> SqlServer puts a limit on the size of rows (in bytes and in number of
> columns). If you really run out of room, you can always just create a
> second table, and a third, etc which have a one-to-one relationship with
> your original table.
> David
>sql

Proper table structure and SQL Server limits

Hello all,
I am migrating a Paradox application to SQL Server. My problem is that the
existing Paradox table structure is limited. Correcting it will mean a
re-write of the application (Delphi app). Although the record and column
limits are higher in SQL Server, it will eventually hit the wall. So I was
wondering if anyone could offer advise on how we might do this best...
The application is essentially an evaluation tool. It is very generic and
can evaluate anything from buying a digital camera or laptop, to purchasing
a house. All the attributes of whatever it is being measure (the
attributes) are defined as a new column.
Example: let's say you are evaluating laptops. The core table may look like
this:
Fields:
1) Identifier
2) Processor Speed
3) Processor Cache
4) Hard Disk Size
5) LAN connection
6) Cost
So in this table, there are 5 things being measure, 6 columns in total. A
record might look like this:
Field Data:
Identifier | Speed | Cache | HD Size | LAN | Cost ...
HP | 3ghz | 2mb | 60G | Wireless | $2000
So you can see that this structure will hit the wall eventually as more and
more criteria are added. With Paradox, the max number of columns is 255. In
SQL Server this is 1024. Of course there is also a maximum record size. For
SQL Server this is 8060 bytes.
What I'd prefer is a structure that has no limits on how big it can be. In
short, I need a new table structure that is long and skinny, vs very wide
(or fat):
Fields:
Identifier
Attribute
Value
So using the above example, the data might look like:
Field Data
Identifier | Attribute | Value
HP | Speed | 3ghz
HP | Cache | 2mb
HP | HD Size | 60G
HP | LAN | Wireless
HP | Cost | $2000
Obviously this structure is preferred because now I won't hit any column or
record limits, but it makes just about everything else in the application
more difficult. Fundamentally data validation becomes difficult
In the above example, how would one define this structure?
Identifier varchar(50)
Attribute varchar(50)
Value ? <-- here lies my problem!!!
In some cases "value" would be an integer, sometimes numeric, sometimes
text. So then I figured, well I could have a number of tables as above,
each for the various data types, integers, numbers, free form text, etc.
Example:
For Integer data
Identifier varchar(50)
Attribute varchar(50)
Value integer
For floating point data
Identifier varchar(50)
Attribute varchar(50)
Value numeric
For free-form data
Identifier varchar(50)
Attribute varchar(50)
Value varchar or ntext
So now I have taken what was in one table, and split it across 3 or more
tables. Of course, all this data would need to be "re-connected" in a grid
like fashion so it looks like just one row of data to the client again.
It all seems to be getting very messy - to simply overcome a column/row
size limitation. Surely there must be an eloquent way to do something like
this?
thanx very much for any input.
regards,
-randall sell
"Randall Sell" <randall@.bytewise.nospam.com.au> wrote in message
news:lsjYc.12329$D7.11613@.news-server.bigpond.net.au...
> Hello all,
> I am migrating a Paradox application to SQL Server. My problem is that the
> existing Paradox table structure is limited. Correcting it will mean a
> re-write of the application (Delphi app). Although the record and column
> limits are higher in SQL Server, it will eventually hit the wall. So I was
> wondering if anyone could offer advise on how we might do this best...
>
.. . .

> So now I have taken what was in one table, and split it across 3 or more
> tables. Of course, all this data would need to be "re-connected" in a grid
> like fashion so it looks like just one row of data to the client again.
> It all seems to be getting very messy - to simply overcome a column/row
> size limitation. Surely there must be an eloquent way to do something like
> this?
>
You have pretty much worked through he issues here. And you're right: the
free-form attribute storage is a pain to manage, has no data integrity and
performs terribly. I'll just add that it's also not what relational
databases are _for_. An RDBMS is designed to model data using relations. A
relation is a tuple of related values, like
( HP, 3ghz, 2mb, 60G, Wireless, $2000 )
So the original design is the correct one. Mainly for performance reasons,
SqlServer puts a limit on the size of rows (in bytes and in number of
columns). If you really run out of room, you can always just create a
second table, and a third, etc which have a one-to-one relationship with
your original table.
David
|||Now why didn't I think of that? That is the sort of input I was looking
for. It would also have some problems, such as creating dynamic queries and
not knowing which table contains a field, but the meta data should sort
that out, so it should be manageable.
thanx
-randall
David Browne wrote:
> So the original design is the correct one. Mainly for performance reasons,
> SqlServer puts a limit on the size of rows (in bytes and in number of
> columns). If you really run out of room, you can always just create a
> second table, and a third, etc which have a one-to-one relationship with
> your original table.
> David
>

Friday, March 23, 2012

proper db design methodology for "custom data"?

I am building an application that requires "custom" data elements for
various different clients of the application. For example, consider an
application that comes with a "standard" order form, that perhaphs consists
of 10 fields that we know ahead of time, orderID, Product Name, Product ID,
etc.
Now consider that the application is delivered via an ASP model, and that
clients we sell the software to, wish to customize the order form to thier
personal liking. In this scenario, they may want to only use say 7 of the
standard fields, but they have 7 additional fields that are specific to
themselves. They may have an internal ID field, or pricing fields that are
specific to themselves.
Every client who subscribes needs to be able to customize the order "form"
accordingly. so if our application is used by 100 clients, we would have
potentially 100 versions of the order form, with totally custom questions.
Of course, I don't think we would want to create 100 versions of the table.
that would be a maintenance nightmare, and be very difficult to program
against.
There is another technique which would use a LOT of meta-data to allow the
dynamic capture of the order data via the form, but this doesn't work at all
when it comes time to report on that data.
My question is, does anyone have previous experience in modeling a database
to deal eligently with these types of requirements? I would greatly
appreciate anyones experience with similiar situations and hear what has and
has not worked.
thanks!Hi Mike
Thank you for using the newsgroup and it is my pleasure to help you with
you issue.
From you information provided, you have standard fields ( all the customer
are same) and custom fields. To design the database to save all the
information, could you decribe more clear of what the customer fields might
be?
What I mean is, what is the flexibility level of the customer fields: Could
the customer specify the number of the custom fields? Is the customer could
specified a certain range of fileds with fixed datatype or as many fields
and data type as they want?
If they could just have certain custom fields and known datatype, you could
just have one table with standard fields and all the possible fields. If
the customer choose to enter the data in his specific fileds, the data will
be saved in corresponding fields; If not, the columns will be NULL.
Looking forward for you reply.
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||Hi Baisong, thanks for your reply.
Let me take a step back and give you the bigger picture. I was using the
Orders table as an example of what we do, however, what we currently offer
is the ability for our clients to define ANY "Form", define all the fields,
what types of fields they are, and also what the input type would be
(dropdownlist, checkbox, radiobutton, etc).
Currently, we are using a strict meta-data format for capturing all the
information necessary to create the "Form" which is generated as a web page.
We have a "formtypes" table that defines a formtypeID, and then a related
"questions" table that holds the specific questions and the definition of
those questions associated with a specific FormType. The question could be
defined as numeric, or date, or text, etc. When a "Form" is submitted, it is
writes one record to a "forms" table that is an instance of that form, which
generates a formid, and then we write each response to a "responses" table,
with the corresoponding formid, and questionid. So every single response
from every single form is actually written to this one table. This has
become much too complex, and a HUGE problem is the inability to be able to
report on this data...since it's entirely custom and we don't know what they
are actually capturing.
We are attempting to look at all the formtypes and questions and create a
Taxonomy ...basically pull out "standard" data that all the clients are
asking and put that data into "real" tables. That will be piece of work.
however, we still need to allow clients to add custom fields on top of what
we offer as standard. The goal is if we can map the data they want to
capture into real fields, we will be able to much easier search on that
data, and also easily report on it. The above data model does well for
capturing purely custom data, however I was hoping for a better format that
would allow us to simplify the capture of this data, and also allow
searching and potentially reporting.
We are redoing are data schema, which is why I'm revisiting this question
and seeing if others have had to deal with this level of complexity. One
potential solution I was thinking about was using the new "Yukon" XML field
type to hold an instance of a submitted form. The form could be serialized
into XML, and could have totally different schemas and still be stored in a
single field. Based on what I read, that data can then be indexed, and
actually searched in combination with relations queries. In addition, I read
something about "promotion", which can let you "promote" specific nodes to
be written into a relational field...which could be a solution for allowing
us to have a mechanism to report on key pieces of data.
We are at the early stages of this work, so all options are open to us. Hope
this gives you a better feel for the complexity of what we are trying to
solve, and I look forward to any suggestions or ideas on the "best
practices" for dealing with this specific type of data modeling problem.
Thanks,
Mike
"Baisong Wei[MSFT]" <v-baiwei@.online.microsoft.com> wrote in message
news:FWwU1cj6DHA.2768@.cpmsftngxa07.phx.gbl...
> Hi Mike
> Thank you for using the newsgroup and it is my pleasure to help you with
> you issue.
> From you information provided, you have standard fields ( all the customer
> are same) and custom fields. To design the database to save all the
> information, could you decribe more clear of what the customer fields
might
> be?
> What I mean is, what is the flexibility level of the customer fields:
Could
> the customer specify the number of the custom fields? Is the customer
could
> specified a certain range of fileds with fixed datatype or as many fields
> and data type as they want?
> If they could just have certain custom fields and known datatype, you
could
> just have one table with standard fields and all the possible fields. If
> the customer choose to enter the data in his specific fileds, the data
will
> be saved in corresponding fields; If not, the columns will be NULL.
> Looking forward for you reply.
> Best regards
> Baisong Wei
> Microsoft Online Support
> ----
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only. Thanks.
>|||Hi Mike
Thank you for using the newsgroup and it is my pleasure to help you with
you issue.
As for saving various types of data in one table, based on my knowledge, it
is hard to do it for the data in SQL Server 2000 database needs regular
storage format. Also, to create one table for one customer would not
practical for the maintenance and developing work would be HUGE. XML would
be a choice, you could use XQuery/XPath expressions on the XML Datatype to
extract and search data and also to get data into a computed column that
can serve as a way to promote information from the XML Datatype instance
into the relational context. Actually, you could ask this question in the
newsgroup in the related newsgroup and our corresponding engineers there
would answer your question about it. The newsgroup would be:
http://support.microsoft.com/newsgroups/default.aspx?ICP=GSS3&NewsGroup=micr
osoft.public.sqlserver.xml
or
news:microsoft.public.sqlserver.xml
Thanks for your post.
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.

proper db design methodology for "custom data"?

I am building an application that requires "custom" data elements for
various different clients of the application. For example, consider an
application that comes with a "standard" order form, that perhaphs consists
of 10 fields that we know ahead of time, orderID, Product Name, Product ID,
etc.
Now consider that the application is delivered via an ASP model, and that
clients we sell the software to, wish to customize the order form to thier
personal liking. In this scenario, they may want to only use say 7 of the
standard fields, but they have 7 additional fields that are specific to
themselves. They may have an internal ID field, or pricing fields that are
specific to themselves.
Every client who subscribes needs to be able to customize the order "form"
accordingly. so if our application is used by 100 clients, we would have
potentially 100 versions of the order form, with totally custom questions.
Of course, I don't think we would want to create 100 versions of the table.
that would be a maintenance nightmare, and be very difficult to program
against.
There is another technique which would use a LOT of meta-data to allow the
dynamic capture of the order data via the form, but this doesn't work at all
when it comes time to report on that data.
My question is, does anyone have previous experience in modeling a database
to deal eligently with these types of requirements? I would greatly
appreciate anyones experience with similiar situations and hear what has and
has not worked.
thanks!Hi Mike
Thank you for using the newsgroup and it is my pleasure to help you with
you issue.
From you information provided, you have standard fields ( all the customer
are same) and custom fields. To design the database to save all the
information, could you decribe more clear of what the customer fields might
be?
What I mean is, what is the flexibility level of the customer fields: Could
the customer specify the number of the custom fields? Is the customer could
specified a certain range of fileds with fixed datatype or as many fields
and data type as they want?
If they could just have certain custom fields and known datatype, you could
just have one table with standard fields and all the possible fields. If
the customer choose to enter the data in his specific fileds, the data will
be saved in corresponding fields; If not, the columns will be NULL.
Looking forward for you reply.
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||Hi Baisong, thanks for your reply.
Let me take a step back and give you the bigger picture. I was using the
Orders table as an example of what we do, however, what we currently offer
is the ability for our clients to define ANY "Form", define all the fields,
what types of fields they are, and also what the input type would be
(dropdownlist, checkbox, radiobutton, etc).
Currently, we are using a strict meta-data format for capturing all the
information necessary to create the "Form" which is generated as a web page.
We have a "formtypes" table that defines a formtypeID, and then a related
"questions" table that holds the specific questions and the definition of
those questions associated with a specific FormType. The question could be
defined as numeric, or date, or text, etc. When a "Form" is submitted, it is
writes one record to a "forms" table that is an instance of that form, which
generates a formid, and then we write each response to a "responses" table,
with the corresoponding formid, and questionid. So every single response
from every single form is actually written to this one table. This has
become much too complex, and a HUGE problem is the inability to be able to
report on this data...since it's entirely custom and we don't know what they
are actually capturing.
We are attempting to look at all the formtypes and questions and create a
Taxonomy ...basically pull out "standard" data that all the clients are
asking and put that data into "real" tables. That will be piece of work.
however, we still need to allow clients to add custom fields on top of what
we offer as standard. The goal is if we can map the data they want to
capture into real fields, we will be able to much easier search on that
data, and also easily report on it. The above data model does well for
capturing purely custom data, however I was hoping for a better format that
would allow us to simplify the capture of this data, and also allow
searching and potentially reporting.
We are redoing are data schema, which is why I'm revisiting this question
and seeing if others have had to deal with this level of complexity. One
potential solution I was thinking about was using the new "Yukon" XML field
type to hold an instance of a submitted form. The form could be serialized
into XML, and could have totally different schemas and still be stored in a
single field. Based on what I read, that data can then be indexed, and
actually searched in combination with relations queries. In addition, I read
something about "promotion", which can let you "promote" specific nodes to
be written into a relational field...which could be a solution for allowing
us to have a mechanism to report on key pieces of data.
We are at the early stages of this work, so all options are open to us. Hope
this gives you a better feel for the complexity of what we are trying to
solve, and I look forward to any suggestions or ideas on the "best
practices" for dealing with this specific type of data modeling problem.
Thanks,
Mike
"Baisong Wei[MSFT]" <v-baiwei@.online.microsoft.com> wrote in message
news:FWwU1cj6DHA.2768@.cpmsftngxa07.phx.gbl...
quote:

> Hi Mike
> Thank you for using the newsgroup and it is my pleasure to help you with
> you issue.
> From you information provided, you have standard fields ( all the customer
> are same) and custom fields. To design the database to save all the
> information, could you decribe more clear of what the customer fields

might
quote:

> be?
> What I mean is, what is the flexibility level of the customer fields:

Could
quote:

> the customer specify the number of the custom fields? Is the customer

could
quote:

> specified a certain range of fileds with fixed datatype or as many fields
> and data type as they want?
> If they could just have certain custom fields and known datatype, you

could
quote:

> just have one table with standard fields and all the possible fields. If
> the customer choose to enter the data in his specific fileds, the data

will
quote:

> be saved in corresponding fields; If not, the columns will be NULL.
> Looking forward for you reply.
> Best regards
> Baisong Wei
> Microsoft Online Support
> ----
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only. Thanks.
>
|||Hi Mike
Thank you for using the newsgroup and it is my pleasure to help you with
you issue.
As for saving various types of data in one table, based on my knowledge, it
is hard to do it for the data in SQL Server 2000 database needs regular
storage format. Also, to create one table for one customer would not
practical for the maintenance and developing work would be HUGE. XML would
be a choice, you could use XQuery/XPath expressions on the XML Datatype to
extract and search data and also to get data into a computed column that
can serve as a way to promote information from the XML Datatype instance
into the relational context. Actually, you could ask this question in the
newsgroup in the related newsgroup and our corresponding engineers there
would answer your question about it. The newsgroup would be:
http://support.microsoft.com/newsgr...&NewsGroup=micr
osoft.public.sqlserver.xml
or
news:microsoft.public.sqlserver.xml
Thanks for your post.
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.

Proper Application of a Subquery

In order to expand my skills in SQL for a database I am working, I developed
a conceptual query with which I am having some difficulty. The problem can
be represented as three tables: tblApartments, tblResidents, tblPhone.
tblResidents links to tblApartments through a field called AptNum. Current,
past, and future residents are stored in tblResidents and catagorized by a
field called Status. Phone numbers (e.g. home, emergency, work, etc) are
linked to the appropriate resident via a field called ResID. tblApartment
contains details about the apartment like building number and floor.
Now let's say I want to get a list of names and work phone numbers for
people that lived in building #3. The query I came up with to get the names
looks like:
SELECT tblApartments.Building, tblApartments.AptNum,
tblResidents.Name, tblResidents.AptNum, tblResidents.Status
FROM tblApartments INNER JOIN tblResidents ON
tblApartments.AptNum = tblResidents.AptNum
WHERE tblApartments.Building = 3 AND
tblResidents.Status = "Moved"
What I can't get a handle on is how to add work phone numbers. I am
assuming a subquery is the correct construct and would be of the form
SELECT tblResidents.ResID, tblPhone.ResID, tblPhone.Number, tblPhone.Type
FROM tblResidents INNER JOIN tblPhone ON
tblResidents.ResID = tblPhone.ResID
WHERE tblPhone.Type = "Work"
However, I don't have a clue how to integrate this into the overall query!
Am I barking up the wrong tree with this structure? If not, any help or
references to online FAQs or tutorials would be greatly appreciated. (I did
look at some on-line references, but it did not help!)
Any help will be greatly appreciated!!
Thanks!
DonDon wrote:
> In order to expand my skills in SQL for a database I am working, I develop
ed
> a conceptual query with which I am having some difficulty. The problem ca
n
> be represented as three tables: tblApartments, tblResidents, tblPhone.
> tblResidents links to tblApartments through a field called AptNum. Curren
t,
> past, and future residents are stored in tblResidents and catagorized by a
> field called Status. Phone numbers (e.g. home, emergency, work, etc) are
> linked to the appropriate resident via a field called ResID. tblApartment
> contains details about the apartment like building number and floor.
> Now let's say I want to get a list of names and work phone numbers for
> people that lived in building #3. The query I came up with to get the nam
es
> looks like:
> SELECT tblApartments.Building, tblApartments.AptNum,
> tblResidents.Name, tblResidents.AptNum, tblResidents.Stat
us
> FROM tblApartments INNER JOIN tblResidents ON
> tblApartments.AptNum = tblResidents.AptNum
> WHERE tblApartments.Building = 3 AND
> tblResidents.Status = "Moved"
> What I can't get a handle on is how to add work phone numbers. I am
> assuming a subquery is the correct construct and would be of the form
> SELECT tblResidents.ResID, tblPhone.ResID, tblPhone.Number, tblPhone.Type
> FROM tblResidents INNER JOIN tblPhone ON
> tblResidents.ResID = tblPhone.ResID
> WHERE tblPhone.Type = "Work"
> However, I don't have a clue how to integrate this into the overall query!
> Am I barking up the wrong tree with this structure? If not, any help or
> references to online FAQs or tutorials would be greatly appreciated. (I d
id
> look at some on-line references, but it did not help!)
--BEGIN PGP SIGNED MESSAGE--
Hash: SHA1
Just include a join of the tblPhone to it's related table:
SELECT A.Building, A.AptNum, R.Name, R.AptNum, R.Status
FROM (tblApartments As A
INNER JOIN tblResidents As R
ON A.AptNum = R.AptNum)
LEFT JOIN tblPhone As P
ON R.ResID = P.ResID
WHERE A.Building = 3
AND R.Status = "Moved"
AND P.Type = "Work"
I used a LEFT JOIN on the tblPhone in case a resident did not have a
Work phone number.
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
--BEGIN PGP SIGNATURE--
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/ AwUBQh+Xr4echKqOuFEgEQJT3QCfRSFLOB36+5+e
0gJlQbDM46GtRGcAn05A
CBHjNQ63P/0GQ76Yy82VTWT/
=B/s0
--END PGP SIGNATURE--|||"Don" <someone@.somewhere.net> wrote in message
news:OdOgs73GFHA.3440@.TK2MSFTNGP10.phx.gbl...
> In order to expand my skills in SQL for a database I am working, I
developed
> a conceptual query with which I am having some difficulty. The problem
can
> be represented as three tables: tblApartments, tblResidents, tblPhone.
> tblResidents links to tblApartments through a field called AptNum.
Current,
> past, and future residents are stored in tblResidents and catagorized by a
> field called Status. Phone numbers (e.g. home, emergency, work, etc) are
> linked to the appropriate resident via a field called ResID. tblApartment
> contains details about the apartment like building number and floor.
> Now let's say I want to get a list of names and work phone numbers for
> people that lived in building #3. The query I came up with to get the
names
> looks like:
> SELECT tblApartments.Building, tblApartments.AptNum,
> tblResidents.Name, tblResidents.AptNum,
tblResidents.Status
> FROM tblApartments INNER JOIN tblResidents ON
> tblApartments.AptNum = tblResidents.AptNum
> WHERE tblApartments.Building = 3 AND
> tblResidents.Status = "Moved"
> What I can't get a handle on is how to add work phone numbers. I am
> assuming a subquery is the correct construct and would be of the form
> SELECT tblResidents.ResID, tblPhone.ResID, tblPhone.Number, tblPhone.Type
> FROM tblResidents INNER JOIN tblPhone ON
> tblResidents.ResID = tblPhone.ResID
> WHERE tblPhone.Type = "Work"
> However, I don't have a clue how to integrate this into the overall query!
> Am I barking up the wrong tree with this structure? If not, any help or
> references to online FAQs or tutorials would be greatly appreciated. (I
did
> look at some on-line references, but it did not help!)
> Any help will be greatly appreciated!!
> Thanks!
> Don
>
I don't think a subquery is required for this, another INNER JOIN should do
it:
SELECT tblApartments.Building, tblApartments.AptNum, tblResidents.Name,
tblResidents.AptNum, tblResidents.Status, tblPhone.Number, tblPhone.Type
FROM tblApartments
INNER JOIN tblResidents ON tblApartments.AptNum = tblResidents.AptNum
INNER JOIN tblPhone ON tblResidents.ResID = tblPhone.ResID
WHERE tblApartments.Building = 3 AND tblResidents.Status = "Moved" AND
tblPhone.Type = "Work"
It's a matter of taste, but I use joins in preference to subqueries where
possible because I think they are easier to read. Also, I've read that the
Query Optimiser often handles joins better than subqueries.
Regards,
Simon|||On Fri, 25 Feb 2005 21:24:59 GMT, MGFoster wrote:
(snip)
>Just include a join of the tblPhone to it's related table:
>SELECT A.Building, A.AptNum, R.Name, R.AptNum, R.Status
>FROM (tblApartments As A
> INNER JOIN tblResidents As R
> ON A.AptNum = R.AptNum)
> LEFT JOIN tblPhone As P
> ON R.ResID = P.ResID
>WHERE A.Building = 3
> AND R.Status = "Moved"
> AND P.Type = "Work"
>I used a LEFT JOIN on the tblPhone in case a resident did not have a
>Work phone number.
Hi MGFoster,
In order for that to work, the P.Type = 'Work' shoould be in the ON
clause, not in the WHERE clause. (And you shouldn't use double quotes to
delimit string constants!)
SELECT A.Building, A.AptNum,
R.Name, R.AptNum, R.Status,
P.Number, P.Type
FROM Apartments AS A
INNER JOIN Residents AS R
ON R.AptNum = A.AptNum
LEFT JOIN Phones AS P
ON P.ResID = R.ResID
AND P.Type = 'Work'
WHERE A.Building = 3
AND R.Status = 'Moved'
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||"MGFoster" <me@.privacy.com> wrote in message
news:LIMTd.5610$MY6.682@.newsread1.news.pas.earthlink.net...
> SELECT A.Building, A.AptNum, R.Name, R.AptNum, R.Status
> FROM (tblApartments As A
> INNER JOIN tblResidents As R
> ON A.AptNum = R.AptNum)
> LEFT JOIN tblPhone As P
> ON R.ResID = P.ResID
> WHERE A.Building = 3
> AND R.Status = "Moved"
> AND P.Type = "Work"
> I used a LEFT JOIN on the tblPhone in case a resident did not have a
> Work phone number.
I believe that if you want to see all residents even if they have no work
phone that you need to add the P.type condition to the Join clause as:
SELECT A.Building, A.AptNum, R.Name, R.AptNum, R.Status
FROM (tblApartments As A
INNER JOIN tblResidents As R
ON A.AptNum = R.AptNum)
LEFT JOIN tblPhone As P
ON R.ResID = P.ResID and P.Type = "Work"
WHERE A.Building = 3
AND R.Status = "Moved"
Good Luck,
Jim|||James Goodwin wrote:
> "MGFoster" <me@.privacy.com> wrote in message
> news:LIMTd.5610$MY6.682@.newsread1.news.pas.earthlink.net...
>
>
> I believe that if you want to see all residents even if they have no work
> phone that you need to add the P.type condition to the Join clause as:
> SELECT A.Building, A.AptNum, R.Name, R.AptNum, R.Status
> FROM (tblApartments As A
> INNER JOIN tblResidents As R
> ON A.AptNum = R.AptNum)
> LEFT JOIN tblPhone As P
> ON R.ResID = P.ResID and P.Type = "Work"
> WHERE A.Building = 3
> AND R.Status = "Moved"
--BEGIN PGP SIGNED MESSAGE--
Hash: SHA1
Hugo & Jim,
Double quotes: Yeah, I know. I move between Access (double quotes OK)
& SQL a lot & probably just got discombobulated.
P.Type = 'Work' in ON clause: I've seen the equivalency evaluation of
"hard coded" data in the JOIN's ON clause before, but I've always put,
what could be a parameter, in the WHERE clause. Is there any increased
efficiency in putting it in the ON clause rather than the WHERE clause?
If there is an efficiency increase, wouldn't that indicate that all
WHERE clause evaluations could be put into the join's ON clause?
I'm not advocating this just curious. Also, I'm too lazy to create some
test tables & data to look at the query's execution plan. ;-)
Thanks,
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
--BEGIN PGP SIGNATURE--
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQh/ s1IechKqOuFEgEQJK3QCg+2KBLrUaTtXxbQ98L95
US9slC6IAn3rb
5PXNZ5Plgzrt65L864qdd7rX
=xIwu
--END PGP SIGNATURE--|||"MGFoster" <me@.privacy.com> wrote in message
news:j1STd.5822$MY6.1200@.newsread1.news.pas.earthlink.net...
> James Goodwin wrote:
work
> --BEGIN PGP SIGNED MESSAGE--
> Hash: SHA1
> Hugo & Jim,
> Double quotes: Yeah, I know. I move between Access (double quotes OK)
> & SQL a lot & probably just got discombobulated.
> P.Type = 'Work' in ON clause: I've seen the equivalency evaluation of
> "hard coded" data in the JOIN's ON clause before, but I've always put,
> what could be a parameter, in the WHERE clause. Is there any increased
> efficiency in putting it in the ON clause rather than the WHERE clause?
> If there is an efficiency increase, wouldn't that indicate that all
> WHERE clause evaluations could be put into the join's ON clause?
> I'm not advocating this just curious. Also, I'm too lazy to create some
> test tables & data to look at the query's execution plan. ;-)
> Thanks,
> --
> MGFoster:::mgf00 <at> earthlink <decimal-point> net
> Oakland, CA (USA)
> --BEGIN PGP SIGNATURE--
> Version: PGP for Personal Privacy 5.0
> Charset: noconv
> iQA/AwUBQh/ s1IechKqOuFEgEQJK3QCg+2KBLrUaTtXxbQ98L95
US9slC6IAn3rb
> 5PXNZ5Plgzrt65L864qdd7rX
> =xIwu
> --END PGP SIGNATURE--
Hello -
In this case, LEFT OUTER JOIN tblPhone ON (R.ResID = P.ResID and P.Type =
'Work') is necessary to ensure that people who don't have work phones are
returned. If you put the P.Type = 'Work' condition in the overall WHERE
clause, then people who don't have work phones will not be returned, because
their P.Type value is null.
Alternatively, you could use the simpler JOIN condition make the condition
in the WHERE clause (P.Type = 'Work' OR P.Type IS NULL).
Regards,
Simon|||> "MGFoster" <me@.privacy.com> wrote in message
< snip >
< snip >
Simon Shearn wrote:
> Hello -
> In this case, LEFT OUTER JOIN tblPhone ON (R.ResID = P.ResID and P.Type =
> 'Work') is necessary to ensure that people who don't have work phones are
> returned. If you put the P.Type = 'Work' condition in the overall WHERE
> clause, then people who don't have work phones will not be returned, becau
se
> their P.Type value is null.
> Alternatively, you could use the simpler JOIN condition make the condition
> in the WHERE clause (P.Type = 'Work' OR P.Type IS NULL).
--BEGIN PGP SIGNED MESSAGE--
Hash: SHA1
Simon, Thanks for the info. It made me want to see how this works. So
I went ahead & created some test tables/data:
use tempdb
go
set nocount on
create table tblApartments (
building tinyint,
aptnum tinyint primary key
)
insert into tblApartments values (1,1)
insert into tblApartments values (1,2)
insert into tblApartments values (1,3)
insert into tblApartments values (2,4)
insert into tblApartments values (2,5)
insert into tblApartments values (3,6)
insert into tblApartments values (3,7)
insert into tblApartments values (3,8)
create table tblResidents(
ResID tinyint primary key,
[name] varchar(20),
aptnum tinyint ,
status varchar(10),
constraint fk_res foreign key (aptnum) references tblApartments
)
insert into tblResidents values (1,'dalton',1,'moved')
insert into tblResidents values (2,'liloo',2,'current')
insert into tblResidents values (3,'lucy',3,'moved')
insert into tblResidents values (4,'harry',4,'moved')
insert into tblResidents values (5,'sondine',5,'current')
insert into tblResidents values (6,'jean-baptiste',6,'moved')
insert into tblResidents values (7,'betty',7,'moved')
insert into tblResidents values (8,'cornelius',8,'current')
create table tblPhone (
ResID tinyint ,
Type varchar(5),
[Number] varchar(10),
constraint fk_phone foreign key (resid) references tblResidents
)
insert into tblPhone values (1,'work','055-1234')
insert into tblPhone values(2,'home','155-1234')
--insert into tblPhone values(3,'work','255-1234')--
insert into tblPhone values(3,'home','355-1234')
insert into tblPhone values(5,'work','455-1234')
insert into tblPhone values(6,'work','555-1234')
insert into tblPhone values(7,'home','655-1234')
--insert into tblPhone values(7,'work','755-1234')-- uncomment to get
betty's PH#
SELECT A.Building, A.AptNum, R.[Name], P.[Number] as Phone, R.Status
FROM (tblApartments As A
INNER JOIN tblResidents As R
ON A.AptNum = R.AptNum ) -- and r.status = 'moved')
LEFT JOIN tblPhone As P
ON R.ResID = P.ResID AND P.Type = 'Work'
WHERE A.Building = 3
AND R.Status = 'Moved'
-- AND (P.Type = 'Work') -- OR P.Type IS NULL)
drop table tblPhone
drop table tblResidents
drop table tblApartments
set nocount off
Result set:
Building AptNum Name Phone Status
-- -- -- -- --
3 6 jean-baptiste 555-1234 moved
3 7 betty NULL moved
Which is correct, 'cuz betty & jean-baptiste are the only residents of
building 3 apts who have moved.
============
If you change the FROM & WHERE clause to this:
FROM (tblApartments As A
INNER JOIN tblResidents As R
ON A.AptNum = R.AptNum )
LEFT JOIN tblPhone As P
ON R.ResID = P.ResID --AND P.Type = 'Work'
WHERE A.Building = 3
AND R.Status = 'Moved'
AND (P.Type = 'Work' OR P.Type IS NULL)
The result set is:
Building AptNum Name Phone Status
-- -- -- -- --
3 6 jean-baptiste 555-1234 moved
which means the "OR P.Type IS NULL" criteria doesn't pull betty's record
as you suggested it would.
This solves some problems I've had w/ LEFT JOINS not working as I had
anticipated. Thanks for the info.
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
--BEGIN PGP SIGNATURE--
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/ AwUBQiEODIechKqOuFEgEQLr0ACgylrysm6ilcay
4mfQ1n/B5GcLw3oAoJ+9
DDimxetXGCEb6UEz2vEmaA4m
=oICZ
--END PGP SIGNATURE--|||"MGFoster" <me@.privacy.com> wrote in message
news:K68Ud.6547$873.1771@.newsread3.news.pas.earthlink.net...
> < snip >
> < snip >
> Simon Shearn wrote:
=
are
because
condition
> --BEGIN PGP SIGNED MESSAGE--
> Hash: SHA1
> Simon, Thanks for the info. It made me want to see how this works. So
> I went ahead & created some test tables/data:
> use tempdb
> go
> set nocount on
> create table tblApartments (
> building tinyint,
> aptnum tinyint primary key
> )
> insert into tblApartments values (1,1)
> insert into tblApartments values (1,2)
> insert into tblApartments values (1,3)
> insert into tblApartments values (2,4)
> insert into tblApartments values (2,5)
> insert into tblApartments values (3,6)
> insert into tblApartments values (3,7)
> insert into tblApartments values (3,8)
> create table tblResidents(
> ResID tinyint primary key,
> [name] varchar(20),
> aptnum tinyint ,
> status varchar(10),
> constraint fk_res foreign key (aptnum) references tblApartments
> )
> insert into tblResidents values (1,'dalton',1,'moved')
> insert into tblResidents values (2,'liloo',2,'current')
> insert into tblResidents values (3,'lucy',3,'moved')
> insert into tblResidents values (4,'harry',4,'moved')
> insert into tblResidents values (5,'sondine',5,'current')
> insert into tblResidents values (6,'jean-baptiste',6,'moved')
> insert into tblResidents values (7,'betty',7,'moved')
> insert into tblResidents values (8,'cornelius',8,'current')
> create table tblPhone (
> ResID tinyint ,
> Type varchar(5),
> [Number] varchar(10),
> constraint fk_phone foreign key (resid) references tblResidents
> )
> insert into tblPhone values (1,'work','055-1234')
> insert into tblPhone values(2,'home','155-1234')
> --insert into tblPhone values(3,'work','255-1234')--
> insert into tblPhone values(3,'home','355-1234')
> insert into tblPhone values(5,'work','455-1234')
> insert into tblPhone values(6,'work','555-1234')
> insert into tblPhone values(7,'home','655-1234')
> --insert into tblPhone values(7,'work','755-1234')-- uncomment to get
> betty's PH#
> SELECT A.Building, A.AptNum, R.[Name], P.[Number] as Phone, R.Status
> FROM (tblApartments As A
> INNER JOIN tblResidents As R
> ON A.AptNum = R.AptNum ) -- and r.status = 'moved')
> LEFT JOIN tblPhone As P
> ON R.ResID = P.ResID AND P.Type = 'Work'
> WHERE A.Building = 3
> AND R.Status = 'Moved'
> -- AND (P.Type = 'Work') -- OR P.Type IS NULL)
> drop table tblPhone
> drop table tblResidents
> drop table tblApartments
> set nocount off
> Result set:
> Building AptNum Name Phone Status
> -- -- -- -- --
> 3 6 jean-baptiste 555-1234 moved
> 3 7 betty NULL moved
> Which is correct, 'cuz betty & jean-baptiste are the only residents of
> building 3 apts who have moved.
> ============
> If you change the FROM & WHERE clause to this:
> FROM (tblApartments As A
> INNER JOIN tblResidents As R
> ON A.AptNum = R.AptNum )
> LEFT JOIN tblPhone As P
> ON R.ResID = P.ResID --AND P.Type = 'Work'
> WHERE A.Building = 3
> AND R.Status = 'Moved'
> AND (P.Type = 'Work' OR P.Type IS NULL)
> The result set is:
> Building AptNum Name Phone Status
> -- -- -- -- --
> 3 6 jean-baptiste 555-1234 moved
> which means the "OR P.Type IS NULL" criteria doesn't pull betty's record
> as you suggested it would.
> This solves some problems I've had w/ LEFT JOINS not working as I had
> anticipated. Thanks for the info.
> --
> MGFoster:::mgf00 <at> earthlink <decimal-point> net
> Oakland, CA (USA)
> --BEGIN PGP SIGNATURE--
> Version: PGP for Personal Privacy 5.0
> Charset: noconv
> iQA/ AwUBQiEODIechKqOuFEgEQLr0ACgylrysm6ilcay
4mfQ1n/B5GcLw3oAoJ+9
> DDimxetXGCEb6UEz2vEmaA4m
> =oICZ
> --END PGP SIGNATURE--
Hello -
Yes, you're right - the alternative form I suggested only works when the
person involved has no phone of any kind, so putting the P.Type = 'Work' in
the join condition, as others suggested, is the correct way of doing it.
Regards,
Simon|||On Sat, 26 Feb 2005 03:28:15 GMT, MGFoster wrote:
(snip)
>P.Type = 'Work' in ON clause: I've seen the equivalency evaluation of
>"hard coded" data in the JOIN's ON clause before, but I've always put,
>what could be a parameter, in the WHERE clause. Is there any increased
>efficiency in putting it in the ON clause rather than the WHERE clause?
Hi MGFoster,
Sorry for the late reply. The flu managed to get me down; I'm now
struggling to remove as much as possible from my 400+ message backlog
before my headache forces me back to bed again. :-)
Anyway, Simon already pointed out that in the case of outer joins, the
choice to put things in the WHERE clause or the ON clause influences the
results.
In the case of INNER joins, there is no performance difference, so
choose what suits you best. My preference (and I know I'm not alone with
this) is to code the "proper" joining criteria (usually following the
defined foreign keys) in the ON and the filter criteria in the WHERE.
But that's just my personal preference.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)

Proper ADO Usage where Conflicts will arise

Hi everyone, I'm creating a ASP.NET 2.0 web application utilizing sql server 2000 as a database. My problem revolves around multiuser acces with long running processes. Some of the pages in the application have long running processes against large tables in the database, lets say that take 2minutes to complete. My problem is how do I utilize ado properly in the rest of my application to display a message to users who may try to access data associated with a table while in the midst of one of its long running processes? For instance I would like to notify the user that "Table X is currently locked, please try again in a few minutes".
Do I catch sqlException and examine the .Number property? Any insight is appreciated.

Thanks.

For Sql server 2005 you can use try /catch to Resolve deadlock:Using TRY/CATCH to Resolve Deadlocks in SQL Server 2005

For sql server 2000 you can take a look at:

Tips for Reducing SQL Server Locks

Troubleshooting Deadlocks

Hope it helps.

|||

Sorry I should add that I'm looking for a way to do this WITHOUT stored procedures. My client does not like using stored procedures (regardless of good idea or not), I'm looking for advice on solutions utilizing C# and ADO.NET set of libraries only.

Thanks

sql

Prompting for userid and password

Hi,
I have a web application which is calling a reporting services URL to load
couple of reports.
The web server is on Machine A and the reporting services and the SQL Server
are on Machine B.
Both the Machines A and B are not on any domain...
But when I log into my website and then try to generate a report, the web
application is popping up an prompt to enter the userid and password.
When U enter the userdid and password of the machine B, I am to view my
reports.
Can anyone please help me in resolving the above issue, where the user would
not want to enter the userid and password.Check the Reporting Services virtual directories in IIS. If they are not
setup with "Enable anonymous access", you need to enable this.
Kaisa M. Lindahl Lervik
"Ashok Segu" <Ashok Segu@.discussions.microsoft.com> wrote in message
news:99B66025-A1E6-49A1-8BFB-0E7B78A92189@.microsoft.com...
> Hi,
> I have a web application which is calling a reporting services URL to load
> couple of reports.
> The web server is on Machine A and the reporting services and the SQL
> Server
> are on Machine B.
> Both the Machines A and B are not on any domain...
> But when I log into my website and then try to generate a report, the web
> application is popping up an prompt to enter the userid and password.
> When U enter the userdid and password of the machine B, I am to view my
> reports.
> Can anyone please help me in resolving the above issue, where the user
> would
> not want to enter the userid and password.|||Add the url of the SSRS services to your "Trusted Sites" in Internet
Options. Surprisingly this works.
Ashok Segu wrote:
> Hi,
> I have a web application which is calling a reporting services URL to load
> couple of reports.
> The web server is on Machine A and the reporting services and the SQL Server
> are on Machine B.
> Both the Machines A and B are not on any domain...
> But when I log into my website and then try to generate a report, the web
> application is popping up an prompt to enter the userid and password.
> When U enter the userdid and password of the machine B, I am to view my
> reports.
> Can anyone please help me in resolving the above issue, where the user would
> not want to enter the userid and password.

Prompt password when calling certain reports only?

Hi,

When I call certain reports from an ASP application, some prompt for password and some are not.

I wonder why is this happen?

Under the Directory Security of Reports under IIS 6, I already enable Anonymous Access for IUSR_XXXX with the correct password.

I also assign IUSR_XXXX as Browser in Report Manager of Reporting Services.

The enviroment is Windows Server 2003 standard edition, IIS 6, SQL Server 2005.

Thanks in advance.

Best regards,

Pop

You can check the data source settings for the reports. There is an option to prompt for password for the datasources of reports.|||

I had try

1)"Use Windows Authentication"

2)"Use a specific user name and password"

3)"No credentials"

in Data source setting and non of it works.

When I try with option 1 and 2, only one of the reports prompt for password(so far that's what I discover, only 1 report prompt for password), the rest no need.

Any clue?

Best regards,

Pop

Prompt for user credentials for database

Hello friends,

In my web application I have saved my connection string into web.config file. Now I have to send this web application to the client in the form of web set up. The issue is that on the client side, user credentials for the database will be different. So can we do some setings that the web application whenever will run should ask for the server name, username & Password. If this can be done then the application can be run anywhere considering all compatibilities.

Please let me know how this can be done.

Thanks & Regards
Girish Nehte

Hi,

We also encounter same issue...we have done following things...

we have stored IP,Database Name,userid and password ( separated by "," ) in notepad file and saved it at some common location.

and in applications we are referring this information to access database...

and we are telling client to put these details in file...so user can not make any other changes in web.config by mistake.

|||

Hi there,

Maybe I didn't understand well what's your problem, but it seems quite simple to me.

You only have one connection string (or user of the database). Then you have, for example, a table with many usernames/passwords you like.

When your client uses the applicaction, you ask for credentials right? Then you use your connection string, to check if its credentials match with any stored on the passwords table! If so you allow him to continue. If not, you don't allow the client to continue.

Hope it helped out :) And its safer than having it written on a text file!

gonzzas

Wednesday, March 21, 2012

promblems connecting to db across a network

Hello,

I've built an application using c#, visual studio 2005 and sql server 2000. The database is sitting on another machine on the network.

When I test the application from visual studio, it all works fine - no problems connecting to the database etc.

However, If I publish the website and move it to the same server as the database and set up the site and users through IIS etc, I get the following error

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

my connection string is

<connectionStrings>

<addname="cashinsConnectionString"connectionString="Data Source=Londevs;Initial Catalog=cashins;User ID=Cash; Password=Cash123;"

providerName="System.Data.SqlClient" />

</connectionStrings>

Anyone have any ideas why this is happening?

Thanks

fogofogo:

Login failed for user 'NT AUTHORITY\NETWORK SERVICE

You are trying to connect to the database with the above account which doesn't have the necessary permissions to connect.

|||

Thanks for your reply.

So do I need to set these permissions on the database or on the server where the database is sitting?

|||

actually - this is strange. I've just put together a smaller application with the EXACT same connection string as above, and it worked fine.

how could that be??Confused

|||

It's most likely a problem with your web.config file (possibly it's doing some impersonation or windows authentication) rather than just the connection string. Check both web.config files to see what you are doing differently.

|||

Thanks.

I compared them both using winmerge and they are both the same.

here my config file

12<!--3 Note: As an alternative to hand editing this file you can use the4 web admin tool to configure settings for your application. Use5 the Website->Asp.Net Configuration option in Visual Studio.6 A full list of settings and comments can be found in7 machine.config.comments usually located in8 \Windows\Microsoft.Net\Framework\v2.x\Config9-->10<configuration>11<appSettings/>12<connectionStrings>1314 <add name="cashinsConnectionString" connectionString="Data Source=servername;Initial Catalog=databasename;User ID=Cash; Password=Cash123;" providerName="System.Data.SqlClient"/>15 </connectionStrings>16 <system.web>17<!--18 Set compilation debug="true" to insert debugging19 symbols into the compiled page. Because this20 affects performance, set this value to true only21 during development.22 -->23<compilation debug="true"/>24<!--25 The <authentication> section enables configuration26 of the security authentication mode used by27 ASP.NET to identify an incoming user.28 -->29<authentication mode="Forms"/>3031<!--32 The <customErrors> section enables configuration33 of what to do if/when an unhandled error occurs34 during the execution of a request. Specifically,35 it enables developers to configure html error pages36 to be displayed in place of a error stack trace.3738 <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">39 <error statusCode="403" redirect="NoAccess.htm" />40 <error statusCode="404" redirect="FileNotFound.htm" />41 </customErrors>42 -->43</system.web>44</configuration>

all looks ok right?

I also pass the connection through...

1private static String connstring = ConfigurationManager.ConnectionStrings["cashinsConnectionString"].ConnectionString;2private static SqlConnection conn =new SqlConnection(connstring);

so I can access the connection from a .cs file that holds my classes and methods etc. Could that be the source of the problem?

Thanks

|||

Hi,

From your description, it seems that you application can connect to your database while lunched from Visual Studio but failed when lunched in IIS, right?

You can try the following steps to check if "AUTHORITY\NETWORK SERVICE" has been permitted to visit the database.

1. Open your Enterprise Manager and open the security node in your local sql server.
2. Click on "Logins", try to see if "AUTHORITY\NETWORK SERVICE" appeared in that list, if not, create the user and assign the corresponding server roles.

Thanks.

|||

Cool! thanks

Project structure when using RepSvcs

Hi,
I have a WinForm project in VS .NET and need to incorporate Reporting
Services.
The application will display the reports to the users on a form with an IE
control.
Is it possible to add the report items to the application project? or
Must I create a separate project of type report and have the reports there?
How could the reports be invoked by the application?
Thanks in advance,
RichardIf you are using IE control you have only one choice. One, the reports need
to be in their own project. Two, they have to be deployed to a server in
order to test your links.
As far as invoking the reports, it confuses me. You stated that you are
using the IE control. The only way to use this control is doing URL
integration. All you are doing is assembling a string and setting the URL
property for the control.
I guess in a convoluted way you could use web services, stream the html to a
file and give the IE control a
If you are using VS.Net 2005 then look at the new controls. There is a
winform and webform controls. The new winform control is a much better way
of integrating reports (I am using it in a Winform application. I use IE
control in a In-Touch application... real time control user interface).
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Richard" <Richard@.discussions.microsoft.com> wrote in message
news:F4FA857A-45A2-4158-A1ED-C238D66D6CD2@.microsoft.com...
> Hi,
> I have a WinForm project in VS .NET and need to incorporate Reporting
> Services.
> The application will display the reports to the users on a form with an IE
> control.
> Is it possible to add the report items to the application project? or
> Must I create a separate project of type report and have the reports
> there?
> How could the reports be invoked by the application?
> Thanks in advance,
> Richard|||Sorry Bruce, I meant a ReportViewer control on a WinForm.
"Bruce L-C [MVP]" wrote:
> If you are using IE control you have only one choice. One, the reports need
> to be in their own project. Two, they have to be deployed to a server in
> order to test your links.
> As far as invoking the reports, it confuses me. You stated that you are
> using the IE control. The only way to use this control is doing URL
> integration. All you are doing is assembling a string and setting the URL
> property for the control.
> I guess in a convoluted way you could use web services, stream the html to a
> file and give the IE control a
> If you are using VS.Net 2005 then look at the new controls. There is a
> winform and webform controls. The new winform control is a much better way
> of integrating reports (I am using it in a Winform application. I use IE
> control in a In-Touch application... real time control user interface).
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Richard" <Richard@.discussions.microsoft.com> wrote in message
> news:F4FA857A-45A2-4158-A1ED-C238D66D6CD2@.microsoft.com...
> > Hi,
> >
> > I have a WinForm project in VS .NET and need to incorporate Reporting
> > Services.
> > The application will display the reports to the users on a form with an IE
> > control.
> > Is it possible to add the report items to the application project? or
> > Must I create a separate project of type report and have the reports
> > there?
> > How could the reports be invoked by the application?
> >
> > Thanks in advance,
> >
> > Richard
>
>|||Ahhh, HUGE difference. There are two ways to use the Winform control: server
and local mode.
Server mode, develop your reports in a reports project, separately. Test out
your report there, deploy and then integrate with Winform control (which is
what I do).
Local mode. Develop report initially in a reports project. Test out report.
Copy rdl file, renaming it to rdlc. Bring the rdlc into your winform
project. Note that you do have much more to do to get full functionality of
a report in local mode. It is nowhere near as simple as integrating in a
report which is deployed to a server.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Richard" <Richard@.discussions.microsoft.com> wrote in message
news:5820FB57-5FC6-4742-A571-1531CC73E4E0@.microsoft.com...
> Sorry Bruce, I meant a ReportViewer control on a WinForm.
> "Bruce L-C [MVP]" wrote:
>> If you are using IE control you have only one choice. One, the reports
>> need
>> to be in their own project. Two, they have to be deployed to a server in
>> order to test your links.
>> As far as invoking the reports, it confuses me. You stated that you are
>> using the IE control. The only way to use this control is doing URL
>> integration. All you are doing is assembling a string and setting the URL
>> property for the control.
>> I guess in a convoluted way you could use web services, stream the html
>> to a
>> file and give the IE control a
>> If you are using VS.Net 2005 then look at the new controls. There is a
>> winform and webform controls. The new winform control is a much better
>> way
>> of integrating reports (I am using it in a Winform application. I use IE
>> control in a In-Touch application... real time control user interface).
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Richard" <Richard@.discussions.microsoft.com> wrote in message
>> news:F4FA857A-45A2-4158-A1ED-C238D66D6CD2@.microsoft.com...
>> > Hi,
>> >
>> > I have a WinForm project in VS .NET and need to incorporate Reporting
>> > Services.
>> > The application will display the reports to the users on a form with an
>> > IE
>> > control.
>> > Is it possible to add the report items to the application project? or
>> > Must I create a separate project of type report and have the reports
>> > there?
>> > How could the reports be invoked by the application?
>> >
>> > Thanks in advance,
>> >
>> > Richard
>>

Tuesday, March 20, 2012

Progress Reporting in an external application

I have a custom external application that executes some packages. I would like to display the execution progress as it would appear in the Progress tab of the SSIS designer. How would I do that? Any help is appreciated.Implement IDTSEvents interface (the simplest way is inherit from DefaultEvents class, and override the methods you need), then call package.Execute(,,IDTSEvents,) method passing your object. Process the events from package and show the progress in the way you want.

Programming with OLEDB and ADO.NET

Hi
I currently use OLEDB in my C++ application to connect to MSSQL. I am
considering moving to ADO.NET.
Is there a document outlining the difference between them?
Lawrence
Lawrence,
I have posted a couple of links below one of which is a comparitave overview
of ADO and ADO.net and the other is data retrevial and modification using
ADO.net. OLEDB is still a part of ADO but you now have access to native SQL
in the SQLClient namespace (that is if you are using Sql Server).
Hope this helps.
http://msdn.microsoft.com/library/de...etprogmsdn.asp
http://msdn.microsoft.com/library/de...WithADONET.asp
|||Lawrence,
I found another link with a good article of the evolution of the data access
model. This may give you a better understanding in the change of the model
from OLE DB to ADO.net.
Good Luck.
http://msdn.microsoft.com/library/de...asp?frame=true
|||Thanks for these articles.
They did not really help me. They refer to using OLE DB with a COM interface.
I did not go that direction using C++ but used the API.
Lawrence
"Brian Brown" wrote:

> Lawrence,
> I found another link with a good article of the evolution of the data access
> model. This may give you a better understanding in the change of the model
> from OLE DB to ADO.net.
> Good Luck.
> --
> http://msdn.microsoft.com/library/de...asp?frame=true
>
|||Lawrence,
I am sorry that this information did not help you. Maybe I have
misunderstood what you are wanting to do. Is there something specific that
you are trying to accomplish that you have a question about?

Programming with OLEDB and ADO.NET

Hi
I currently use OLEDB in my C++ application to connect to MSSQL. I am
considering moving to ADO.NET.
Is there a document outlining the difference between them?
LawrenceLawrence,
I have posted a couple of links below one of which is a comparitave overview
of ADO and ADO.net and the other is data retrevial and modification using
ADO.net. OLEDB is still a part of ADO but you now have access to native SQL
in the SQLClient namespace (that is if you are using Sql Server).
Hope this helps.
--
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/adonetprogmsdn.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconAccessingDataWithADONET.asp|||Lawrence,
I found another link with a good article of the evolution of the data access
model. This may give you a better understanding in the change of the model
from OLE DB to ADO.net.
Good Luck.
--
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/sqlserverprog.asp?frame=true|||Thanks for these articles.
They did not really help me. They refer to using OLE DB with a COM interface.
I did not go that direction using C++ but used the API.
Lawrence
"Brian Brown" wrote:
> Lawrence,
> I found another link with a good article of the evolution of the data access
> model. This may give you a better understanding in the change of the model
> from OLE DB to ADO.net.
> Good Luck.
> --
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/sqlserverprog.asp?frame=true
>|||Lawrence,
I am sorry that this information did not help you. Maybe I have
misunderstood what you are wanting to do. Is there something specific that
you are trying to accomplish that you have a question about?

Programming with OLEDB and ADO.NET

Hi
I currently use OLEDB in my C++ application to connect to MSSQL. I am
considering moving to ADO.NET.
Is there a document outlining the difference between them?
LawrenceLawrence,
I have posted a couple of links below one of which is a comparitave overview
of ADO and ADO.net and the other is data retrevial and modification using
ADO.net. OLEDB is still a part of ADO but you now have access to native SQL
in the SQLClient namespace (that is if you are using Sql Server).
Hope this helps.
--
http://msdn.microsoft.com/library/d...netprogmsdn.asp
http://msdn.microsoft.com/library/d...aWithADONET.asp|||Lawrence,
I found another link with a good article of the evolution of the data access
model. This may give you a better understanding in the change of the model
from OLE DB to ADO.net.
Good Luck.
http://msdn.microsoft.com/library/d...asp?frame=true|||Thanks for these articles.
They did not really help me. They refer to using OLE DB with a COM interface
.
I did not go that direction using C++ but used the API.
Lawrence
"Brian Brown" wrote:

> Lawrence,
> I found another link with a good article of the evolution of the data acce
ss
> model. This may give you a better understanding in the change of the mode
l
> from OLE DB to ADO.net.
> Good Luck.
> --
> http://msdn.microsoft.com/library/d...asp?frame=true
>|||Lawrence,
I am sorry that this information did not help you. Maybe I have
misunderstood what you are wanting to do. Is there something specific that
you are trying to accomplish that you have a question about?

Programming with c#.NET and variables

Hi all,

I know how to basically change SSIS variables from within a C#. NET winform application. But can anyone point me on how to change the contents of a connection manager SSIS connection from withing C#.net please. That is..how do i parameterize a connection manager connection to basically accept the connection information from within the winform app.

Thanks

bump|||

One way is to use an expression to set the ConnectionString property of the ConnectionManager. You can base the expression on a variable.

You can also set the connection manager properties directly through code, by getting the collection of connections from the package.

|||

the problem is that i already have the ssis package...im basically creating a win form front end to mask the ssis package. in my win form im capturing the sql server connection info, and im trying to figure out how to variabalize the sql connection in the package connection manager.

i was able to do something like this easily for a flat file connection but am have no clue on how to do it for the sql connection.

|||

This should not be at all harder then dealing with flat file connections. The only thing you need to do is compose your connection string and assign it to the connection manager. You might want to post your initial code here and somebody will help you.

Thanks.

|||

well...one of the problems that i am currently running into is that the Expressionlist for an OLE DB connection does not have an assignable password field.

what that means is that when i click on my SQL connection in the Connection Manager and click the elipsis in the expression field in the properties window, I cant seem to assign a variable to the password field. Seems like i can assign an initial catalog, username and servername..but without being able to assign the password field to a variable im not sure how to proceed.

suggestions anyone?

|||

YoungEngineer wrote:

well...one of the problems that i am currently running into is that the Expressionlist for an OLE DB connection does not have an assignable password field.

what that means is that when i click on my SQL connection in the Connection Manager and click the elipsis in the expression field in the properties window, I cant seem to assign a variable to the password field. Seems like i can assign an initial catalog, username and servername..but without being able to assign the password field to a variable im not sure how to proceed.

suggestions anyone?

You add the Password parameter to the ConnectionString. Typically I build a variable that is used to build a dynamic connection string, and then I just reference that variable in the connection manager's expression property for ConnectionString.|||

is the password field in the connectionstring just called "password"?

Data Source=localhost;User ID=myUser;Initial Catalog=test;Provider=SQLNCLI.1;Persist Security Info=True;Auto Translate=False;

|||Yes.