I had a profile element named "Country", however, I want it to be named "CountryId". I can change this in the web.config with no problems, but then I need to update the code manually any place Profile.Country is referenced. Also, it seems I would have to write some SQL to update all the values in the profile table from Country to CountryId. Is there an easier way to do this? I'm using Visual Studio 2005 and SQL Server Express 2005.
Thanks,
Wes
We have a previous SQL 2012 cluster that emails us when a new database is added. I am unable to figure out why we get this error any time we add a new database to it, and also it prevents us from adding a new availability group to this cluster because of this error.
I also am unable to figure out what profile it is talking about as this was setup before me and I am not a DBA.
I have a table named PERSON and a field named PERSON_ID. How can I set this field to Autonumber? I know I have to use the IDENTITY command, but when I view this field in "design" view, all the IDENTITY options are grayed out.
How can I set this field with the IDENTITY properties?
I have a database on sql2000. I want to change the length of a field in Table A, but it is related to another field in Table B. When I tried to change the length of the field in Table A via
ALTER TABLE table ALTER COLUMN field varchar(5).The query analyzer generates the following error.
Server: Msg 5074, Level 16, State 8, Line 1 The object 'UQ__table__77BFCB91' is dependent on column 'field'. Server: Msg 4922, Level 16, State 1, Line 1
ALTER TABLE ALTER COLUMN field failed because one or more objects access this column.While when I tried the same query on the field in TABLE B, the query completed without any errors.
What is the best way of converting datatime field value 29/03/2005 08:58:27 to 29/03/2005. I only want to remove Time from date and I am using Sql Server 2000. Thanks Arvind
Is it possible, using VB code, to retain a user on a particular page until the status of a certain field in a database is changed? The scenario I am working on is that a person makes a reservation and has to wait until that reservation has been accepted or rejected by the administration.
Dim dsResv As DataSet dsResv = objResv.DALgetResvStatus(resvId)
While (dsResv.Tables(0).Rows(0).Item("resvStatus") = "pending")
dsResv = objResv.DALgetResvStatus(resvId)
If dsResv.Tables(0).Rows(0).Item("resvStatus") = "denied" Then failure.Visible = True LinkButton1.Visible = True
ElseIf dsResv.Tables(0).Rows(0).Item("resvStatus") = "reserved" Then success.Visible = True LinkButton1.Visible = True End If
End While
This is how I tried to do it, but it doesnt seem to work. Any suggestions?
I have to change a due_date field with a varchar(10) to a datetime. I created a new table with datetime but when I imported data into the table it errored out due to the datatype. A varchar(10) going into a datetime(8).
Is there way to resolve this without losing data?. or how do you result this problem?.
The title says it all. I've used ALTER DATABASE, and ALTER TABLE...ALTER COLUMN to change all my character fields from 'Compatibility_42_409_30003' to the default I want ('Latin1_General_CI_AI') on databases converted from SQL7. Now I just have these ntext fields to change...
I have to modify field length in the table, which is part of publication. I tried to use an Enterprise Mgr and received an error message because that table is scheduled for replication. Is any way around this beside temporary stopping and restarting replication? And actually how to do this to be sure that after restart the data will be again in sync. We have SQL Server 2000 Enterprise Edition and Windows 2000 Advanced Server.
I have a content table with a field "[Content_ID] [int] IDENTITY(1,1) NOT NULL". I need to change the content id of some of the content because it was leaked into an xml feed and we want to stop people from accessing the content, is it possible to change/issue a new Id for a field that is set as "IDENTITY"?
I have a content table with a field "[Content_ID] [int] IDENTITY(1,1) NOT NULL". I need to change the content id of some of the content because it was leaked into an xml feed and we want to stop people from accessing the content, is it possible to change/issue a new Id for a field that is set as "IDENTITY"?
My table has more columns than this but I will just use the ones here tht are important. I have two columns in a table these are "ExpiryDate" and "Archived". When the row is created the "Archived" field will be null but the user will have entered a expiry date. When this date is reached I would like the "Archived" data to change to "1". Is this possible? Would I have to do it through some kind of script or can I set the database to do this automatically?
I use Chinese Windows XP+SQL 2005 express+Microsoft Visual Web Developer 2005 Express Edition In aspnet_Profile table , the Collation of PropertyValuesString field is <database default> I hope to replace <database default> with SQL_Latin1_General_CP1_CI_AS ,but I get the following error, why? The following error was encountered while changing the collation: Setting for Length must be from 16 to 16.
I would like to pull data from two seperate columns based on the vaule for MakeFlag. So if MakeFlag = 0 I would like the description to show but anything else I would like catalog description to show up.
Hi,I use view to join difference table together for some function. However,when the "real" table fields changed (e.g. add/delete/change field). Theview table still use the "old fields".Therefore everytimes when I change the real table, I also needed open theview table and save it by SQL enterprise manager manually for update theview table field.Can we use a SQL command or other method to update it directly?Regards,Silas
Hi, This is Raj..could anyone pls explain the sql profile and how we will set the row-level locks as a dba.Sorry it is a silly question but sometimes these questions are bugging my mind. Thnak u in advance.
I use the default database called "ASPNETDB.mdf" that is automatically created in Visual Studio Express 2005.... There is an table called "aspnet_Profile" that holds the profile-properties, UserID etc. There is also another table called "aspnet_Users" that holds all usernames, UserID etc... No to my problem: I have a SqlDataSource-control and want to select all users that have the property profile.Color = "Blue".... How can I write the SQL-part for that?
I am using a SqlDatasource and need to set a SelectParamter to the ProviderUserKey (The GUID of the user when Profiles are enabled) Can anyone tell me whether it is possible and How? I am currently using the session state to store it in and then using the session=... to get the value into the parameter. Is there a direct way of passing this value into a SelectParameter when using a SqlDataSource? Thanks in advance.
Hi, Is it necesarry that to run SQL Mail, you need MS Exchange Server as the mail server? Our mail server is MDaemon 2.8. Can anyone tell me what would be the mail profile for MDaemon? TIA Wilson
Is there any way that I can use an ASP.NET profile variable in a T-SQL parameter? I need to base a query on the current ASP.NET profile variable for purposes of creating a report. Thanks Deon
Hello.When I create a user at the ASP.NET database, I need to insert more fields than the defaults, and I do it like this: Dim customProfile As ProfileCommon = ProfileCommon.Create(CreateUserWizard1.UserName, True) customProfile.telephone = (CType(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("TelephoneText"), TextBox)).Text(telephone example)Those data are inserted at the DB at the aspnet_Profile table, in the fields PropertyNames & PropertyValuesString, but they are saved together (see image above)
I want to separate those properties in the GridView as long as each property appears in a column, is it possible? Thank you very much, i'm expecting your answers.
Hi, I use the Table Profile Provider: http://www.asp.net/downloads/sandbox/table-profile-provider-samples/ When I call for example: Profile.FirstName does this access the DB every time this call appears in my code? Or all the profile is loaded to the cache when the user first loggs on? thanks
Hi all. Quick question. I'm using VS2005, C#, aspx page.I'm creating a Profile to store login and password. That part is working... I can call the values (and display them) using this code <%= Profile.login %> and <%=Profile.password %>Now I want to create a Grid View that will connect to the SQL db, see if the login and password value stored in the Profile match that of ones in the SQL db. So if the profile is login: bob password: dog, the grid view will output all application ID numbers associated with the bob and dog. Here is the SQL code...trying to use the <%=Profile.login %> as a filter on the login and password doesn't seem to work...Can anyone tell me what I'm doing wrong? How can I reference a value in the Profile within an SQL statement?SELECT ApplicationStatus.Description, Customer.CustomerName, Application.ApplicationDateFROM Application INNER JOIN ApplicationStatus ON Application.ApplicationStatusID = ApplicationStatus.ApplicationStatusID INNER JOIN Customer ON Application.ApplicationID = Customer.ApplicationID INNER JOIN [User] ON Application.DealerId = [User].UserIdWHERE ([User].LoginId = '<%= Profile.login %>') AND ([User].LoginPwd = '<%= Profile.password %>') AND (ApplicationStatus.Description = 'Pending')
I have created a profile object which is a list to store photoId into an array. (kinda like a shopping cart) which will persist in the list untill manually deleted by the user.I want to use the photo Ids stored in this object in my profile as a parameter for an sql select statement to be displayed into a data grid. What is the best way to go about this... and suggestions... I know you can use a profile property as a parametere in a sqldatasource but Im not sure how to do this for an array.HELP