Showing posts with label chose. Show all posts
Showing posts with label chose. Show all posts

Tuesday, March 27, 2012

Configuration Manager - which configuration type to chose ?

It seems to me, that the best way is to have one Environment Varible containing the name of the SQL Server, so that you can look up the configuration in the SSIS Configuration Table when you run the package.

Is this the preferable way of doing it ? I would like to hear some positive/negative comment of why chosing a configuration type instead of another.

It seems to me that putting all of the configuration in the Environment variable is harder work but most secure (server breakdown vs table corruption/database error...)

Let's have some comments

http://blogs.conchango.com/jamiethomson/archive/2005/11/02/2342.aspx

http://www.windowsitpro.com/SQLServer/Article/ArticleID/47688/SQLServer_47688.html

-Jamie

|||Jamie, You keep on posting this link to Kirk's article... and it looks like a good one; but it's on a for-pay site. Upon investigation it looked like there was a free registration there; but that doesn't seem to give me access to the articles. Is there a way to get these articles without subscribing? Or another link perhaps?|||

Not as far as I know. Maybe Kirk could better answer that question better.

Its unfortunate because it really is a very good article.

-Jamie

sqlsql

Tuesday, February 14, 2012

concurrency and timestamp or datetime

Hi everyone!

I've read a lot of document about optimistic concurrency and different implementations which made me decide to chose the timestamp/datetime approuch to validate if another user has editet the record.

I'm saying timestamp OR datetime because I dont really care which one to use but I can't make any of them work as expected.

Here is my setup:

I'm using a DataSet (autogenerated by Visual Studio 2005) with 4 stored procedures to select, update, delete and insert records.
I'm using a GridView to show these values but when using a timestamp in the database the parameter type in my ObjectDataSource is an Object which ofcause ins't right and I can't change it to Byte[].
If I instead use a Datetime I believe that the date formatting is done somehow (even though i make the field ReadOnly in the GridView) - I can see the date is shown as:"01-01-1900 00:01:07" but the actually SQL that is executed is: 'Jan 1 1900 12:01:07:000AM' why this differense?

So my question is which one should I use and how - the datetime/timestamp dosn't have to be shown - I would actually prefer that the datetime/timestamp was somehow hidden from the presentationlayer and only present in the data access layer but still would be transfered to and from the database when doing updates etc.

Best of all I could use a working example.

Thanks in advance :-)

There is a big difference between DateTime and Timestamp, the former is a data type while the late is a derived data type SQL Server uses internally for housing keeping. So Timestamp will not move with your data. Try the link below for a tutorial on concurrency. Hope this helps.

http://www.15seconds.com/issue/030604.htm

|||

Thanks for you reply.

I know there is a big difference between the two datatypes but that is not my problem - my problem is HOW to use one of them.

You are wrong about that "timestamp vil not move with your data" - what I've done to overcome my Byte[] problem is to cast the timestamp to char(8) - when I later want to make an update I compare with the timestamp (which is casted back from char(8) to timestamp). This works like it should but I just don't like this casting thing - there must be a better way.

I've allready read the artickel you've linked - among a lot of others. This one is unfortunally in VB which is not my strong side. Is there another one in C# that you know of?