Generating Membership Number

Jan 20, 2005

Hi all,


I have a question about generating membership numbers on the fly when someone registers to my website.





Rather than using the auto increment field as a membership number, I would rather keep it as just as the ID for the record and I would like to have a seperate membership number that looks something similar to this...





SR357324J





This will then stay with them for the lifetime of their membership and be on their printed loyalty card.





My questions are...


1) Is there a 'good practice' for membership number format and generation?





2) If this was used as a unique field, is there a degradation in performance when looking up records due to it being alphanumeric.





I may be well off base here, however these are my thoughts so far and your opinion/help is greatly appreciated.





Thanks for your contribution.

View 2 Replies


ADVERTISEMENT

Generating Sequence Number

Aug 29, 2001

Hello,

I need to know how to generating a sequence number, for example, from 300,000 to 900,000 without skipping any number due to failure. For example, if user 1 request a number then he/she will get 300000 in a transaction. User 2 will get 300001. How ever user 1's transaction fails, then the next request should get 300000. Is it possible to do this in SQL2K? If so, how do I create a table that and stored procedure that can do this.

Thank you so much.

NK

View 3 Replies View Related

Generating Sequence Number....

Oct 3, 2007

Hi,
I got stuck with a trivial issue. I have a table named T1 having column as Col1 (INT). I have another table named T2 having columns Col1(Int), COl2(Int). Following are the reacords in my table T1.


Col1
----
1
1
1
1
2
2
3
3
3
3
3
4
5
6
6
7

And I want to migrate the data from T1 to T2 where the Col1 data of T1 will get migrated to Col1 of T1 and after the migration is done the T2 should have the data like this.........

Col1 Col2
---- -----
1 1
1 2
1 3
1 4
2 1
2 2
3 1
3 2
3 3
3 4
3 5
4 1
5 1
6 1
6 2
7 1


Thanks In Advance,
Rahul Jha

View 14 Replies View Related

Generating Sequence Number....

Nov 14, 2007

Hello folks,
I have a table where the records are like followings.

ID Value
---------------
1 aa
1 aa
1 aa
1 bb
1 bb
1 bb
1 bb
1 cc
2 pp
2 dd
2 dd
3 qq
4 aa



I need to include one column "SeqId" which will be having value based on the 1st 2 columns (ID + Value). I am struglling with this since last few days. Can I request you guys to help me out in this reagard.

ID Value SeqId
-----------------------------
1 aa 1
1 aa 2
1 aa 3
1 bb 1
1 bb 2
1 bb 3
1 bb 4
1 cc 1
2 pp 1
2 dd 1
2 dd 2
3 qq 1
4 aa 1




Thanks,
Rahul Jha

View 14 Replies View Related

How Can It Automatically Generating A Ordered Number

Jul 5, 2006

hi,
i am a newcomer and a freshman in asp.net. i am now writing a web-based system for SME as my final year project. i am going to use sql server and asp.net in C# to perform my final year project.
as asp.net is new for me, i would have some simple problems to ask.
1. in the project, i would like the system can automatically generate the enquiry number for each new order input to the system. for example today is 05 July 2006, the enquiry number would like 2006211xxxx, where 2006 is year, 211 is the day count start from 1 Jan and xxxx is the random number/ ordered number. how can i implement this? i even don't know how to generate the ordered number. could anyone help me
2. if there is an unknown test sample in each order input. as the sample number for each order is different, how can i set a flexible table that can have different number of rows for user to input the test result.
thanks
Rgds, universe

View 1 Replies View Related

Generating Unique Sequence Number

Jul 19, 2000

Is there wa way to generate unique sequence numbers in SQL server?
(just like the way it is in Oracle i.e. seqeuence and then use nextval)

View 2 Replies View Related

Sequence Number Generating With A Twist

Apr 9, 2008

:eek:

I'm having a brain not functioning day - well who am I kidding - more like a year :rolleyes:

I need some help with some sequence numbering and cannot even get my head around the logic I want to use, let alone the actual code.

I have a dataset with 3 fields:

Area
ID
RefNo

This table contains a list of employee ID's by Area and each employee has a RefNo (counter) in each area.

The data comes from 2 different sources and is combined in this table. Some employees had no RefNo already assigned to them so I have entered their RefNo as 10000 in order to ensure they are sorted at the bottom of the list.

The ID's that have RefNo's have to keep the one they have. Therefore, I need to create RefNo's for the ones that currently have RefNo 10000.

These numbers I create have to follow on from the highest RefNo for the Area.

For example:

Area ID RefNo
A Z 1
A Y 2
A X 3
A W 10000
A V 10000
B N 1
B O 10000
B P 10000

So, for Area A, ID's W and V would have to be assigned RefNo 4 and 5, and for Area B, ID's O and P would have to be assigned RefNo 2 and 3.


Hope this makes sense to all.

BTW, am using SQL 2000 at the moment.

Thanks in advance for any help!

View 11 Replies View Related

Generating An Unique Number Within SSIS - Looking For Good Examples

Aug 17, 2007

Does anybody know how to generate a new identity value from within SSIS. Can anybody point me to a good example using a script component?

Thanks you very much!!!!
Sergio

View 2 Replies View Related

Generating Sequenced Line Numbers For Each Invoice Number

May 8, 2008

Can you help me with SQL issue I€™m stuck on?
I wish to take source data that looks like this:





Invoic_num

Line_num








6658

0








6658

2








6658

8








7721

2








7721

3







And rebuild the line numbers like this:





Invoic_num

Line_num








6658

1








6658

2








6658

3








7721

1








7721

2







This seems completely impossible to me. So I was thinking that maybe a second procedure using update could be run against the table after the initial build.

View 10 Replies View Related

SQL 2012 :: Generating CREATE TABLE Scripts For Large Number Of Tables

Feb 11, 2014

Other than right-clicking on each individual table in SSMS and generating a CREATE script, is there a simple way to generate CREATE TABLE scripts for tables within a given database?

Background: I have a bunch of tables in one database, and I would like to add tables to a second database that have the same names and basic structures of some of the tables from the first database.

I do not need to transfer any data from the tables, this is a seperate project that will use a similar data structure. I just want to generate the CREATE TABLE scripts for 30ish tables within the first database, and then I'll tweak the scripts as appropriate and run them against the new database.

[URL] ....

View 7 Replies View Related

Using Membership UserId Guids With SqlParameters (Membership UserId Guid)

May 7, 2008

In my site, when a user registers, I need to create rows in additional tables besides aspnet_Users. So, I need to be able to pass the generated userId guid to subsequent SqlCommands. I'm having a terrible time with this. What's the correct way to set up a SqlParameter so that it will accept a guid? I keep getting this error: "Conversion failed when converting from a character string to uniqueidentifier."
I've tried creating the parameter both with and without a SqlDbType.
cmd.Parameters.AddWithValue(paramName, guid);
and
SqlParameter p = new SqlParameter(paramName);p.SqlDbType = SqlDbType.Guid;cmd.Parameters.Add(p);
and I get the same error either way.
Driving me nuts! Any help appreciated.

View 1 Replies View Related

Membership Database

Feb 20, 2007

Hi all,
First ASP.NET project - please be gentle !
OK. Ready to add personalisation and membership. I have VS2005 Professional, including SQL Server 2005 developer, but I understand that VS2005 defaults to creating a local SQL Express file in the App_Data directory and that suits me just fine for now. Unfortunately I can't get VS to create it for me and the ASP.NET Configuration tool complains it can't connect to the database.
First, some REALLY dumb questions to show how little I really know ...

if the application is using a SQL Express file, does the SQL Server 2005 process need to be started in order to access the local database file (or does it just get opened like an access database)
does the Broswer process need to be started - this is all just running on my local machine
when I finally publish this site on my hosted service I could do with understanding what will need to be done to get THAT database accessed ... maybe cross that bridge later
I can go to the VS command prompt and run aspnet_regsql.exe in wizard mode. Going through the steps on that I could give it my SQL Server 2005 server name (after I start it) but that's not what I'm trying to do. I just want it to create and connect to a local file in the App_Data.
machine.config shows ...
  <connectionStrings>    <add name="LocalSqlServer" connectionString="data source=.SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />    <!-- <add name="LocalSql2005" connectionString="Data Source=MICKSPCSSLMJ;Initial Catalog=aspnetdb;Integrated Security=True"     providerName="System.Data.SqlClient" />     -->  </connectionStrings> 
The commented connection string I used to temporarily prove that I could access SQL2005. It's no longer used and I've put the other references back to "LocalSqlServer" as below ... <membership>
<providers>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />
</providers>
</membership>
<profile>
<providers>
<add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</profile>
<roleManager>
<providers>
<add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer"
applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</roleManager>The profile provider is clearly pointing to "LocalSqlServer" which in turn points to : connectionString="data source=.SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
What am I missing please ?

View 3 Replies View Related

How To Membership And Login In SQL?

Mar 14, 2007

I have a two problems. First is connecting to my sql server 2005 express with my sql account. Every time i try to configure data source to connect to my db on server using my windows auth. it works and when i try using my sql account i get error, User is not associated with a secure SQL Server connection. Second, how can i configure my application to store membership, roles, user data in a database on my server like /Servername/SQLEPRESS/mydbname and not to App_Data/ASPNETDB. Tnx in adv.

View 3 Replies View Related

.NET Membership And SQL Users (not Sa/dbo)

Mar 14, 2007

I recently moved my .NET project out to production, the server is Windows 2003 running SQL 2005. My developement server was a Windows XP running SQL 2005. Here is my issue.
Under development I created a specific user to log in as, created a role and specified exactly what application specific stored procedures etc. that user was allowed access to. Everything worked fine. Backing that database up and restoring it to the new server, when I attempt to log in as the user (and yes I re-created the login, with the user, just as I did on the development server), I get this error... 
EXECUTE permission denied on object 'aspnet_CheckSchemaVersion', database 'MoldKit', schema 'dbo'.
So I attempt to login as SA, and everything works... so I assign the db_owner role to my user and login, everything works... problem being they shouldn't be db_owner. And they're most definitely not assigned this role on development. I even went so far as to delete the database, and recreate it from scratch using the aspnet_regsql.exe and I get the same error. Anyone have any idea why this is happening, or the proper roles I need to assign so the user isn't a dbo, but can still call all the required aspnet procedures. Or could this be some other issue caused by 2003?
I've seen this error in a lot of posts, but never once saw a definiative answer to what causes it and and what the fix is.

View 1 Replies View Related

SQL Exception In Web App Asp.net 2.0 Membership

Apr 6, 2007

I have just recovered data from a hard drive crash.  I installed a fresh copy of Windows Server 2003 with sp2. Have SQL Standard Running with sp2, and VS 2005 standard running sp1. 
I have several webs on this server, was able to get most up and running fine, but one web and database cannot make the connection after recovery.  I had to reapply permissions and folder security to all webs, and change provided dbo privaledges to network_services. However I am still getting the following error:
Server Error in '/bpe' Application.--------------------------------------------------------------------------------
The EXECUTE permission was denied on the object 'aspnet_CheckSchemaVersion', database 'Fitness1stDb', schema 'dbo'. 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: The EXECUTE permission was denied on the object 'aspnet_CheckSchemaVersion', database 'Fitness1stDb', schema 'dbo'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 
Stack Trace:
[SqlException (0x80131904): The EXECUTE permission was denied on the object 'aspnet_CheckSchemaVersion', database 'Fitness1stDb', schema 'dbo'.]   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857354   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734966   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +149   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +886   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132   System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +415   System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135   System.Web.Util.SecUtility.CheckSchemaVersion(ProviderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck) +367   System.Web.Security.SqlMembershipProvider.CheckSchemaVersion(SqlConnection connection) +85   System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121   System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105   System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42   System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83   System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160   System.Web.UI.WebControls.Login.AttemptLogin() +105   System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35   System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
 
--------------------------------------------------------------------------------Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
 
What procedure should I follow to fix this issue?

View 3 Replies View Related

Membership Deployment

Jun 15, 2007

hi
 
I am trying to add membership to my site. i use visual web developer and the set controls. i.e. login etc. I also used the asp web config tool which is where my test users are.  Everything works locally. but when i upload it  and try to log on I get this error message:
Server Error in '/' Application.


An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
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: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)Source Error:



An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:



[SqlException (0x80131904): An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735043
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +820
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +130
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84
System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197
System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121
System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105
System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42
System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83
System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160
System.Web.UI.WebControls.Login.AttemptLogin() +105
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
Can anyone out ther please help me with this.
thanksNick


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

View 3 Replies View Related

Membership GetAllUsers SP

Nov 15, 2007

Hello,
I am using the Membership application for my project. In the database (MS SQL 2005) the program created alot of SPs for the Membership, Roles, Profiles ....
Is there a function to return a list of users that are online? There is this function aspnet_Membership_GetNumberOfUsersOnline and aspnet_Membership_GetAllUsers.
What i want is a Table with the usernames of all the users that are online in my application. No page index, just a big table with all the online users. I need to get all the usernames for another SP that i just build.
Any ideas?

View 5 Replies View Related

ASP.NET Membership Database

Jun 9, 2008

Hello, I have an ASP.NET Membership Database that exists on a remote server.  I have been using this database as I developed my ASP.NET 2.0 application locally.  When I attempted to promote my ASP.NET 2.0 application to production, I am unable to connect to that same remote database.  Oddly, there is another database on that same remote server that I can access from my ASP.NET application in both development and production.
Can anyone explain to me what could cause this?
 Thank you!

View 3 Replies View Related

Membership Database

Dec 29, 2004

I need to create a membership database that includes levels and premiums for each level. Can anyone offer any examples of how this should be done? What tables I would need and how they would be related to each other?

Thank you for any suggestions,

View 3 Replies View Related

ASP.NET / SQL 2k Membership Prob

Jun 10, 2006

Almost have my custom membershipprovider finsihed, but have ran into a small snag.Scenario:: 2 methods. CreateUser(blah blah) and ValidateUserName(string username). CreateUserWizard control calls CreateUser(blah blah) which in the start of the method calls ValidateUserName(string username). ValidateUserName runs a stored procedure on SQL 2k to check and see if user exists in the db. Returns a bool true or false. If true, then everything works correctly and returns a message displaying that the user exists, please enter a different name.Now the problem. If it returns false, meaning that the username doesnt exist and is available to use, it calls a stored procedure to create the record in the users db. This is where the problem lies. It does NOTHING but sit there waiting. But it never seems to time out. If I comment out the validating. It will add a record successfully.Im wondering if it has something to do with calling 2 stored procedures consecutivly????::CODE TO FOLLOW::

View 2 Replies View Related

Through Group Membership

Sep 26, 2007

on the login properties i see a third option under security access
- Grant access
- Deny access
- Through group membership

what is the third one? I tried to change it to grant access but it doesn't let me. Neither can I uncheked a database box on 'Database Access tab'. It says DB owner cannot be dropped.

=============================
http://www.sqlserverstudy.com

View 1 Replies View Related

Membership Configuration

Jul 19, 2006

I am attempting to follow the instructions:
Walkthrough: Creating a Web Site with Membership and User Login (Visual Studio)
When I attempt to create a membership user with the ASP.NET Configuration wizard nothing happens - it attempts to launch my browser and if I am not connected to the intenet it insists on connecting. If I am connected then nothing happens - it is as if I clicked on air. A wizard is supposed to launch so that I can set up users.
Any help would be appreciated - I am really trying to get to creating an application that authenticates users for admitance to a restricted area in a website.
Thanks!

View 1 Replies View Related

SqlCacheDependency + Asp.Net Membership == Not Working

Jul 24, 2006

Decided to try testing SqlCacheDependency and got the following.... thoughts???After using the following code...void Application_Start(object sender, EventArgs e)     {        System.Data.SqlClient.SqlDependency.Start (ConfigurationManager.ConnectionStrings["testConnectionString"].ConnectionString);     }//-------------------------------- ... then more code                    SqlCommand sqlCommand = new SqlCommand("select ApplicationName from dbo.aspnet_Applications", sqlConnection);                    SqlCacheDependency sqlCacheDependency = new SqlCacheDependency(sqlCommand);//-------------------------------- ... then more codeMembershipUser membershipUser =  Membership.CreateUser(defaultUserNameTextbox.Text, defaultUserPasswordTextbox.Text);        if (membershipUser != null)        {//----------------------------- ... more codethe above code no longer works giving the below exception : using a plain database generated using the following statement

"aspnet_regsql -E -S . -d testDatabase -A all"
[SqlException (0x80131904): UPDATE failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type methods.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +177
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +68
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2300
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +147
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1021
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +314
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +413
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +115
System.Web.Security.SqlMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +3325
System.Web.Security.Membership.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +214
System.Web.Security.Membership.CreateUser(String username, String password, String email) +31
System.Web.Security.Membership.CreateUser(String username, String password) +7
testCustomMembership.defaultCreateUserButton_Click(Object sender, EventArgs e) in c:projects
esearchsamplehandler estCustomMembership.aspx.cs:33
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +97
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4861

View 1 Replies View Related

Configuring Roles/Membership SQL To Not Use DBO?

Aug 26, 2006

I have a site with roles/membership working fine on my local machine, but I am having serious trouble deploying it to a shared host.  My hosting provides a sql 2000 database, but the user created for it that I use is not dbo.  I am errors when I try to access my site such as Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'The procedure was created under my user, so it's there, but it's full name ia myusername.aspnet_CheckSchemaVersionHow can I tell the asp.net membership/role provider to use my username instead of dbo when it looks for objects? Thanks   

View 6 Replies View Related

Setting Up The SQL Express Membership

Aug 10, 2007

Hi,
 I am running a project that has a custom membership flow.
I need to use the local SQL Express Membership instead.
In orderer to achieve this, I have added the following lines in my web.config:
in the membership section:
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />
 in the connectionStrings section:<add name="LocalSqlServer" connectionString="data source=.SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
 
Problem :
When I am opening ASP.NET Configuration > Security
I have the following error message:
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.
The following message may help in diagnosing the problem: Object reference not set to an instance of an object.
 
Any idea how I could fix this?

View 5 Replies View Related

Cant Connect To Membership Provider Db

Sep 10, 2007

 I've started developing an ASP.net 2.0 app with VWD Express.The default membership provider db of SQL Server 5005 Express is not installed on my host servers. So my workaround has been to use a Full blown SQL Server 2005 DB as a custom membership provider declared in web.config. This works fine on the production server. However, when i try to login from my development app I get Exception # 40 can't connect to SQL server membership provider.. Moreover, my app configuration confirms there is problems connecting to this server in my development environment. How can I solve this and bring my development app up & running again? many thanks 

View 1 Replies View Related

Database Permissions To Use Membership

Jan 22, 2008

I recently transfered my web app to my Windows 2003 server and am having difficulty getting the system to allow me to login.I am using MS SQL Express 2005 and the SQL Express Manager.I have a user/password setup with SQL Authentication.  It appears that I am connecting okay, but I am unable to login to the site.  I have tried three different accounts with no luck.  I know I am using the correct passwords.What permissions do I have to grant my database user to allow me to login to my site?As I am new to SQL Express and the manager, a more specific reply would be very helpful.Thank you,Joshua Foulk 

View 1 Replies View Related

Membership Db Becommes Read Only

Feb 12, 2008

I have a VS 2005 web site on my local development server (IIS running on windows XP). It uses the standard visual web developer express database for the membership provider.  When I upload to my production server (Windows Server 2003) the membership db becomes read only.  I've checked all the role & user permissions as well as my folder access rules.
 How can I get the db to behave properly on my production server?
 Many thanks in advance
 

View 3 Replies View Related

Question About Aspnet Membership Db

Mar 15, 2008

I know this may sound like a silly question but, my project currently uses two databases, the aspnet membership db and our application db. What I'm wanting to know is if there is a way to combine them without lossing any current functionality from either one? Also what if any gotchas there might be?

View 5 Replies View Related

Membership And SQL/ASPNETDB Question

Apr 8, 2008

I've set up the membership and authentication tables/stored procedures on an SQL2005 Express database. I'm now trying to get the login on my forms to work. I set up two 'members' through the Web Site Administration Tool and everything seems to work fine as far as logging in is concerned.
However, I need to retrieve some information from the membership tables through the codebehind but I've discovered that the data created by the WSAT wasn't stored in my database but in the ASPNETDB.MDF file in my application's Bin folder. How can I ensure that the data created by the WSAT is stored in the correct database? What have I missed?

View 5 Replies View Related

Membership On Sql Server 2000?

May 9, 2006

Hello,I'm programming asp.net 2.0 with a mySql database.Now I want to implement membership-features.I consider converting mySql to SQL server 2000 because then I don't have to build a custom membershipprovider.my question is: does membership work as good on sqlserver2000 as it does on sqlserver2005? (my host doesn't support sqlserver2005 (yet).another question: can I expect problems converting the database from mysql to sqlserver2000?

View 1 Replies View Related

Membership Data Provider

May 23, 2006

I created a membership database on my local computer. DB is SQL Server 2005. I created create sripts for that database and created this database in a SQL Server 2000 instance on another box.As soon as I changed my web.config file
to point to the new database, I got this error below. What is causing
it?The 'System.Web.Security.SqlMembershipProvider' requires a
database schema compatible with schema version '1'.  However, the
current database schema is not compatible with this version.  You may
need to either install a compatible schema with aspnet_regsql.exe
(available in the framework installation directory), or upgrade the
provider to a newer version.Do I have to create a local Membership database in a SQL 2000 instance, script it out and then create in the other box?Thanks

View 1 Replies View Related

Finicky Membership Test (IN)

Feb 13, 2003

I am convinced this code should work for SQL Server 2000 but is does not return the correct set. Please share any input, I am stuck.:confused:

A list is set named 'oklist', in this example a state list: (CA, AR, AK)

SELECT Subscribers.SubscriberID, Subscribers.EMail
FROM (Subscribers INNER JOIN SubscriberAddress ON (Subscribers.SubscriberID = SubscriberAddress.SubscriberID))
WHERE SubscriberAddress.state IN ('#oklist#')

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved