我已經有了一個真正的麻煩了。合併ASP會員用戶和tbUsers從數據庫Windows應用程序的SQL
我有我的勝利應用程序和很多功能與TbUser表。 這是一個與ID,用戶名和密碼簡單的表,以及一些可空領域
現在我需要用我的ASP.NET成員關係表進行合併:S
__ 最後我需要註冊用戶在我的WinApplication中!
和登錄到ASP.NET web應用程序> _ <
TABLE [dbo].[aspnet_Membership](
[ApplicationId] [uniqueidentifier] NOT NULL,
[UserId] [uniqueidentifier] NOT NULL,
[Password] [nvarchar](128) COLLATE Cyrillic_General_CI_AI_KS_WS NOT NULL,
[PasswordFormat] [int] NOT NULL DEFAULT ((0)),
[PasswordSalt] [nvarchar](128) COLLATE Cyrillic_General_CI_AI_KS_WS NOT NULL,
[MobilePIN] [nvarchar](16) COLLATE Cyrillic_General_CI_AI_KS_WS NULL,
[Email] [nvarchar](256) COLLATE Cyrillic_General_CI_AI_KS_WS NULL,
[LoweredEmail] [nvarchar](256) COLLATE Cyrillic_General_CI_AI_KS_WS NULL,
[PasswordQuestion] [nvarchar](256) COLLATE Cyrillic_General_CI_AI_KS_WS NULL,
[PasswordAnswer] [nvarchar](128) COLLATE Cyrillic_General_CI_AI_KS_WS NULL,
[IsApproved] [bit] NOT NULL,
[IsLockedOut] [bit] NOT NULL,
[CreateDate] [datetime] NOT NULL,
[LastLoginDate] [datetime] NOT NULL,
[LastPasswordChangedDate] [datetime] NOT NULL,
[LastLockoutDate] [datetime] NOT NULL,
[FailedPasswordAttemptCount] [int] NOT NULL,
[FailedPasswordAttemptWindowStart] [datetime] NOT NULL,
[FailedPasswordAnswerAttemptCount] [int] NOT NULL,
[FailedPasswordAnswerAttemptWindowStart] [datetime] NOT NULL,
[Comment] [ntext] COLLATE Cyrillic_General_CI_AI_KS_WS NULL,
PRIMARY KEY NONCLUSTERED
(
[UserId] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[aspnet_Membership] WITH CHECK ADD FOREIGN KEY([ApplicationId])
REFERENCES [dbo].[aspnet_Applications] ([ApplicationId])
GO
ALTER TABLE [dbo].[aspnet_Membership] WITH CHECK ADD FOREIGN KEY([UserId])
REFERENCES [dbo].[aspnet_Users] ([UserId])
表有一個不同的名稱和不同的內容,也是我在ASP.NET密碼,坐落在不同的表用戶名疑惑:S
我想我需要調用一些SQL convertation過程內部ASP網站的OnClose我winApplication或其他地方。這樣,我會TbUsers轉換爲AspMembership只允許多重登入到該網站,並留在用我的TbUsers表。
但是,這將是真的很難SQL程序:(
ASP表用戶名:
TABLE [dbo].[aspnet_Users](
[ApplicationId] [uniqueidentifier] NOT NULL,
[UserId] [uniqueidentifier] NOT NULL DEFAULT (newid()),
[UserName] [nvarchar](256) COLLATE Cyrillic_General_CI_AI_KS_WS NOT NULL,
[LoweredUserName] [nvarchar](256) COLLATE Cyrillic_General_CI_AI_KS_WS NOT NULL,
[MobileAlias] [nvarchar](16) COLLATE Cyrillic_General_CI_AI_KS_WS NULL DEFAULT (NULL),
[IsAnonymous] [bit] NOT NULL DEFAULT ((0)),
[LastActivityDate] [datetime] NOT NULL,
PRIMARY KEY NONCLUSTERED
(
[UserId] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[aspnet_Users] WITH CHECK ADD FOREIGN KEY([ApplicationId])
REFERENCES [dbo].[aspnet_Applications] ([ApplicationId])
和一個更硬的方式 - 是重寫所有程序ASP.Membership databace,但後來我需要使用SQL ASP存儲過程,只是希望它會工作得很好。
而第二種方式是更容易接受我來回只要不過更正確,更不是硬編碼...
所以我需要你的建議: -/
是的,這就是我現在正在做的,但是我遇到了第一個麻煩創建用戶......現在就問它> __ < – Cynede 2010-03-02 10:47:03