I'm engaged in writing a product using LinqToSql for data-access. While we're rapidly developing, the model changes often. This means we dump and reload the database lots while developing. Thus, overhead is involved to recreate baseline data each time.
A process that restores a DB backup is not useful, because we would need to update...
(resolved: see bottom)
I have the following code snippet:
Protected Sub SqlDataSource1_Inserted(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.SqlDataSourceStatusEventArgs)
Handles SqlDataSource1.Inserted
affected = CInt(DirectCast(e.Command.Parameters("@affected"), IDbDataParameter).Value)
newID = CInt(DirectCas...
Hi,
what user account does my .net wcf service run under when I am hosting it in iis 7?
Is it the IUSR_machine account?
What is the easiest way for me to run under a different account? (just for this service, don't want other things hosted in my IIS to be effected).
...
I have the same database running on two different machines. The DB's make extensive use of Identity columns, and the tables have clashed pretty horribly. I now want to merge these two together before sorting out the undelying issue which I may do by
A) Using GUIDs (unweildy but works everywhere)
B) Assigning Identity ranges, kind of na...
My employer is considering implementing a single-account, multiple profile system across their various web properties. The thinking is that SSO will be more convenient for users, but they might not want their activities on a dating site to be associated with their contributions to a forum on another site.
I'm very cautious about this ap...
I have many tables in my database which are interrelated. I have a table (table one) which has had data inserted and the id auto increments. Once that row has an ID i want to insert this into a table (table three) with another set of ID's which comes from a form(this data will also be going into a table, so it could from from that table)...
Is there a way to reserve or skip or increment value of identity column?
I Have two tables joined in one-to-one relation ship. First one has IDENTITY PK column, and second one int PK (not IDENTITY). I used to insert in first, get ID and insert in second. And it works ok.
Now I need to insert values in second table without inserting in...
I have seen various methods used when retrieving the value of a primary key identity field after insert.
declare @t table (
id int identity primary key,
somecol datetime default getdate()
)
insert into @t
default values
select SCOPE_IDENTITY() --returns 1
select @@IDENTITY --returns 1
Returning a table of identities following...
I have an HSQLDB database with a generated ID and I want the auto-incrementing values to always be above 100,000. Is this possible with HSQLDB? Is this possible with any database?
...
I've seen this question posted similarly in the past, I was hoping someone can point me in the right direction, the User.Identity.Name class returns the domain login.
Which class exposes the actual name?
For user "John Doe" who logs into the web application supplying my_domain\jdoe
User.Identity.Name -
Returns : *my_domain\jdoe*
Sy...
My company is in need of a federated identity solution, and being a Microsoft shop, we're looking to use MS technologies to accomplish this goal.
We don't have Server 2008 or .NET 3.5 in production, so we're limited to a .NET 2.0/Server 2003-based solution.
This means (in terms of a federated identity solution), Active Directory Federa...
I have a table that normally, upon insert, the auto-key will increment. But, there are some instances when we want to set the ID (as would easily be done with "IDENTITY INSERT" in SQL).
Is there a way to accomplish this with LINQ to SQL?
Thanks,
...
[This is a bit of an unusual problem, I know...]
What I need is a script that will change every unique id value to new one in our database. The problem is that we have configuration tables that can be exported between instances of our software which is id-sensitive (clobbering existing ids). Years ago, we set up a "wide-enough" id gap ...
Hello all,
I have problem with gridview deleting.I have table name Doctor with
Id,Name,Address,Phone.Id is auto generated field.After adding data
when i am displaying in gridview then if delete any id from gridview
Again then if i add any new details from the form its starting from
the new number.I mean if i delete the last id no 5 then ...
Hi
In recent years I was using MSSQL databases, and all unique records in tables has the ID column type of bigint (long). It is autoincrementing and generally - works fine.
Currently I am observing people prefer to use GUIDs for record's identity.
Does it make sense to swap bigint to guid for unique record id?
I think it doesn't make...
Is there a tsql query to tell what SQL server identity column value it expects to use for the next row insert?
Edited to add:
I deleted and recreated a table with
[personID] [int] IDENTITY(1,1) NOT NULL
as part of my CREATE TABLE command. I've also attempted to reseed identity columns while removing all information in that table a...
Hi
I was wondering if it is possible, as my 5 minutes of experimentation proved fruitless.
I hoped it would be as easy as:
T Identity<T>(T t) { return t; }
But this fails to compile on generic methods taking Func parameters. Eg OrderBy. Even specifying type parameters (which is exactly what I want to avoid!), it fails to compile.
...
I am inserting records through a query similar to this one:
insert into tbl_xyz select field1 from tbl_abc
Now I would like to retreive the newly generated IDENTITY Values of the inserted records. How do I do this with minimum amount of locking and maximum reliability?
...
I'm in the process of designing a fairly complex system. One of our primary concerns is supporting SQL Server peer-to-peer replication. The idea is to support several geographically separated nodes.
A secondary concern has been using a modern ORM in the middle tier. Our first choice has always been Entity Framework, mainly because th...
Hi,
I set up the transactional replication(not updatable subscriber) between sql server 2005 database. The tables in published database have identity columns. The tables were replicated without problem. But when I back up and restore the subscriber database, I could not insert row in a table which contains identity increment field and i...