15,895,370 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 9142936 (Top 15 by date)
Member 9142936
4-Feb-16 11:30am
View
Thank you very much, I fixed the problem by having setup my ms sql 2014 using a different database name. I run a few databases in 2012, and had to set the 2014 database to point in a different name. It was my own fault. thanks for your help.
Member 9142936
3-Feb-16 18:26pm
View
I have even upgraded my database to ms sql express 2014 hoping that would solve the compatibility issue and that didn't work I am still getting the error. The error is I am using wrong version, version 706 for server and v 782 for table, I now have ms sql express 2014 both management and server on my machine. When I try to attach file I get the following error,
"The database 'C:\FDDTFINAL\MVCFTTD\MVCFTTD\APP_DATA\MVCFTTDFINALV1.MDF' cannot be opened because it is version 782. This server supports version 706 and earlier. A downgrade path is not supported.
Could not open new database 'C:\FDDTFINAL\MVCFTTD\MVCFTTD\APP_DATA\MVCFTTDFINALV1.MDF'. CREATE DATABASE is aborted. (.Net SqlClient Data Provider)".
I have checked permissions of all files, does anyone have a solution or work around.
Can anyone help?
Thanxs
Everything I read say that download and configuring ms sql express 2014 should have worked. I hate to loose my data in my database.
Member 9142936
3-Feb-16 13:57pm
View
I just found out that I am getting a 948 error, I do not understand because I am using code first and the database was created in ms visual studios express 2012. How do get the version changed? The ms sql express 2012 is v11.0.2100.60 (X64) or upgraded. I do not know the version of my tables.
Thanks for the quick response.
Member 9142936
19-Feb-14 17:33pm
View
Thanks for your input, I solved the problem by changing the code to "model.Posts.Add(post);" from "model.AddToPost(post);" it seems that MVC3 will not accept "AddToPost" and it wants the routing identified properly by using "model.Posts".
Member 9142936
15-Nov-13 13:52pm
View
Does any of my Tables need change, there are two table that have GenealogyId in them. The Value nextId the SP is not accepting.
Could this be the Tables.
Thanks again for your quick response.
Thanks
ASW
Member 9142936
15-Nov-13 13:16pm
View
I quite do not understand, is it supposed to go this way. Change the GenealogyId to ID, and Values to @NextId, as follows:
CREATE PROCEDURE [dbo].[aspnet_AddGenealogy]
@FamilyName char(200),
@MiddleName1 char(200),
@MiddleName2 char(200),
@MiddleName3 char(200),
@FirstName char(200),
@DOB Nvarchar(100),
@Gender char(20),
@COOB char(200),
@SOB char(200),
@COB char(200),
@Newsletter Nvarchar(10),
@DateTimeGenealogy DateTime
AS
Begin
INSERT INTO aspnet_Genealogy(FamilyName, MiddleName1, MiddleName2, MiddleName3, FirstName, DOB, Gender, COOB, SOB, COB, Newsletter, DateTimeGenealogy) VALUES(@FamilyName, @MiddleName1, @MiddleName2, @MiddleName3, @FirstName, @DOB, @Gender, @COOB, @SOB, @COB, @Newsletter, @DateTimeGenealogy)
SELECT *
FROM aspnet_Users INNER JOIN aspnet_PersonalTree ON
aspnet_Users.UserId = aspnet_PersonalTree.UserId
INNER JOIN aspnet_Genealogy ON aspnet_PersonalTree.Id = aspnet_Genealogy.Id;
@nextId = usp_getNextId insert into aspnet_PersonalTree(Id, UserId) values(@nextid, @UserId) insert into joinTable(Id, UserId) values(@nextId, @UserId)
insert into joinaspnet_PersonalTree(Id, UserId) values(@nextId, @otherId)
END
Is this how the SP work look?
Thanks again for your help, and look forward to hearing from soon...
Thanks
ASW
Member 9142936
15-Nov-13 12:35pm
View
Thanks again I am able to complete the SQL, but I am now getting a error when I run the SP. The error is as follows:
"Server Error in '/' Application.
Cannot insert explicit value for identity column in table 'aspnet_PersonalTree' when IDENTITY_INSERT is set to OFF.
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: Cannot insert explicit value for identity column in table 'aspnet_PersonalTree' when IDENTITY_INSERT is set to OFF.
Source Error:
Line 286: {
Line 287:
Line 288: throw ex;
Line 289:
Line 290: }
Source File: c:\Demo2\MemberShip and RoleProvider Demo\MemberShip and RoleProvider Demo\User\User.aspx.cs Line: 288
Stack Trace:
[SqlException (0x80131904): Cannot insert explicit value for identity column in table 'aspnet_PersonalTree' when IDENTITY_INSERT is set to OFF.]
User_User.Button1_Click(Object sender, EventArgs e) in c:\Demo2\MemberShip and RoleProvider Demo\MemberShip and RoleProvider Demo\User\User.aspx.cs:288
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9552874
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724"
I have checked the table, aspnet_PersonalTree and can figure out why the INSERT is not working. I have changed the SP as follows:
"CREATE PROCEDURE [dbo].[aspnet_AddGenealogy]
@FamilyName char(200),
@MiddleName1 char(200),
@MiddleName2 char(200),
@MiddleName3 char(200),
@FirstName char(200),
@DOB Nvarchar(100),
@Gender char(20),
@COOB char(200),
@SOB char(200),
@COB char(200),
@Newsletter Nvarchar(10),
@DateTimeGenealogy DateTime
AS
Begin
INSERT INTO aspnet_Genealogy(FamilyName, MiddleName1, MiddleName2, MiddleName3, FirstName, DOB, Gender, COOB, SOB, COB, Newsletter, DateTimeGenealogy) VALUES(@FamilyName, @MiddleName1, @MiddleName2, @MiddleName3, @FirstName, @DOB, @Gender, @COOB, @SOB, @COB, @Newsletter, @DateTimeGenealogy)
SELECT *
FROM aspnet_Users INNER JOIN aspnet_PersonalTree ON
aspnet_Users.UserId = aspnet_PersonalTree.UserId
INNER JOIN aspnet_Genealogy ON aspnet_PersonalTree.GenealogyId = aspnet_Genealogy.GenealogyId;
Declare @UserId UNIQUEIDENTIFIER, @GenealogyId Int
INSERT INTO aspnet_PersonalTree(UserId, GenealogyId) Values(@UserId, @GenealogyId)
END
"
I have DECLARED the Values in the SP, that allowed me to create the SP. Now I am having a Insert problem.
Can you help?
Thanks
ASW
Member 9142936
15-Nov-13 11:29am
View
Thanks for your quick response, the planning stage is that I want to join aspnet_Users, and aspnet_PersonalTree together, and also join aspnet_Genealogy, and aspnet_PersonalTree together. The aspnet_Users is the user table and I would like to keep it that way, I also would like to keep the aspnet_Genealogy table is being use for other users to search and select to add from the aspnet_Genealogy table to be added to their family tree. One User can use the same record from the aspnet_Genealogy table as another user, but the record have a different relationship to the other user.
I have tried a inner join it did not work, I must be doing something wrong. I am trying to build a relationship between the tables aspnet_Users and aspnet_PersonalTree, the UserId. I am also trying to build a relationship between aspnet_Genealogy and aspnet_PersonalTree, GenealogyId. I have also created a INSERT as well for UserId and GenealogyId, but I am getting a ERROR, "error incorrect syntax near 'END' in sql statement". Do not know why I am getting this error. The code for the SP, is as follows:
CREATE PROCEDURE [dbo].[aspnet_AddGenealogy]
@FamilyName char(200),
@MiddleName1 char(200),
@MiddleName2 char(200),
@MiddleName3 char(200),
@FirstName char(200),
@DOB Nvarchar(100),
@Gender char(20),
@COOB char(200),
@SOB char(200),
@COB char(200),
@Newsletter Nvarchar(10),
@DateTimeGenealogy DateTime
AS
Begin
INSERT INTO aspnet_Genealogy(FamilyName, MiddleName1, MiddleName2, MiddleName3, FirstName, DOB, Gender, COOB, SOB, COB, Newsletter, DateTimeGenealogy) VALUES(@FamilyName, @MiddleName1, @MiddleName2, @MiddleName3, @FirstName, @DOB, @Gender, @COOB, @SOB, @COB, @Newsletter, @DateTimeGenealogy)
SELECT UserId
FROM aspnet_Users INNER JOIN aspnet_PersonalTree ON
aspnet_Users.UserId = aspnet_PersonalTree.UserId;
INSERT INTO aspnet_PersonalTree(UserId)
SELECT GenealogyId
FROM aspnet_Genealogy INNER JOIN aspnet_PersonalTree ON
aspnet_aspnet_Genealogy.GenealogyId = aspnet_PersonalTree.GenealogyId;
INSERT INTO aspnet_PersonalTree(GenealogyId)
END
Can you have a look to see what causing the error?
Thanks again for your help and look forward hearing from you soon.
Thanks
ASW
Member 9142936
14-Nov-13 9:20am
View
There are two things that I need help with, the first thing is that I have to assign a role to the membership manually. I would like the members role to be automatically setup as a user right away when the member registers. The second thing is that the data ownership is not assigned to user to many.
Can anyone help?
Thanks
ASW
Member 9142936
7-Nov-13 15:44pm
View
Hi there,
Thank you very much for the quick response, I am getting an error when testing the login page. The error is as follows:
WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive).
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.InvalidOperationException: WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive).
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:
[InvalidOperationException: WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive).]
System.Web.UI.ClientScriptManager.EnsureJqueryRegistered() +2170338
System.Web.UI.WebControls.BaseValidator.RegisterUnobtrusiveScript() +10
System.Web.UI.WebControls.BaseValidator.OnPreRender(EventArgs e) +9575857
System.Web.UI.Control.PreRenderRecursiveInternal() +83
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18055
How do I correct this error.....
Member 9142936
31-Oct-13 15:01pm
View
Thank you very much for your qick response. The reason there are two tables for storage is because a user can do a search from one table, aspnet_SearchGen and select, if they find the individual in that table to be put in the aspnet_Genealogy, which would be associated with the UserId and UserName from another table, aspnet_Users, which I didn't think would be needed. There could be different UserId's and UserName associated with the same rows.
The table, aspnet_Users, code is as follows:
CREATE TABLE [dbo].[aspnet_Users] (
[ApplicationId] UNIQUEIDENTIFIER NOT NULL,
[UserId] UNIQUEIDENTIFIER DEFAULT (newid()) NOT NULL,
[UserName] NVARCHAR (256) NOT NULL,
[LoweredUserName] NVARCHAR (256) NOT NULL,
[MobileAlias] NVARCHAR (16) DEFAULT (NULL) NULL,
[IsAnonymous] BIT DEFAULT ((0)) NOT NULL,
[LastActivityDate] DATETIME NOT NULL,
PRIMARY KEY NONCLUSTERED ([UserId] ASC),
FOREIGN KEY ([ApplicationId]) REFERENCES [dbo].[aspnet_Applications] ([ApplicationId])
);
GO
CREATE UNIQUE CLUSTERED INDEX [aspnet_Users_Index]
ON [dbo].[aspnet_Users]([ApplicationId] ASC, [LoweredUserName] ASC);
GO
CREATE NONCLUSTERED INDEX [aspnet_Users_Index2]
ON [dbo].[aspnet_Users]([ApplicationId] ASC, [LastActivityDate] ASC);
Maybe you could direct me to a different and easier way of doing it. Such as you mention before maintaining within a session and access across, what's the best way to do that. Your help would be appreciated. I am fairly new to this code. Thanks again for your quick response and look forward to hearing from soon.
Thanks
ASW
Member 9142936
27-Oct-13 21:21pm
View
Hi Mahesh,
Thank you much...
Thanks
ASW
Member 9142936
27-Oct-13 12:23pm
View
Continue:
The code for SearchResults.aspx is as follows:
<%@ Page Title="" Language="C#" MasterPageFile="~/Members/Main.master" AutoEventWireup="true" CodeFile="SearchResults.aspx.cs" Inherits="Members_SearchResults" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<link href="Styles/Content1.css" rel="stylesheet" />
<div id="content">
<br /><%=OutPutString%>
<br />
<br />
<br />
<br />
<br />
</div>
<div id="ad" class="style55" style="font-family: Arial, Helvetica, sans-serif">Please place your ad here....</div>
Do you have any ideas of how to correct the error, I am sure it is something small that I am missing?
Thanks again for your help and look forward to hearing from you in the near future.
Thanks
ASW
Member 9142936
27-Oct-13 12:10pm
View
Hi Mahesh,
Thank you for your quick response, I have written the code for the response.write for the SearchResults page. I got an error in the code, the error was as follows:
"Server Error in '/' Application."
Quote:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1043: { or ; expected
Source Error:
Line 14: {
Line 15:
Line 16: get (this.Page.PreviousPage != null)
Line 17: {
Line 18:
Source File: c:\Genealogy\Members\SearchResults.aspx.cs Line: 16
Below is a copy of my code for SearchResults.aspx.cs, which as follows:
<blockquote class="FQ"><div class="FQA">Quote:</div>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Members_SearchResults : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
public String OutPutString
{
get (this.Page.PreviousPage != null)
{
protected String OutPutString ="";
GridView GridView1 = (GridView)this.Page.PreviousPage.FindControl("GridView1");
//GridViewRow selectedRow = GridView1.SelectedRow;
OutPutString += "Family: " + Session["FamilyName"].ToString() + "<br />";
OutPutString += "First: " + Session["FirstName"].ToString() + "<br />";
OutPutString += "Middle: " + Session["MiddleName1"].ToString() + "<br />";
OutPutString += "Middle: " + Session["MiddleName2"].ToString() + "<br />";
OutPutString += "Middle: " + Session["MiddleName3"].ToString() + "<br />";
OutPutString += "Gender: " + Session["Gender"].ToString() + "<br />";
OutPutString += "Birthday: " + Session["DOB"].ToString() + "<br />";
OutPutString += "Country: " + Session["COOB"].ToString() + "<br />";
OutPutString += "State: " + Session["SOB"].ToString() + "<br />";
OutPutString += "City: " + Session["COB"].ToString() + "<br />";
OutPutString += "Type: " + Session["GenType"].ToString() + "<br />";
OutPutString += "Rank: " + Session["GenRank"].ToString() + "<br />";
OutPutString += "Titles: " + Session["GenTitles"].ToString() + "<br />";
OutPutString += "Titles: " + Session["GenTitles1"].ToString() + "<br />";
OutPutString += "Titles: " + Session["GenTitles2"].ToString() + "<br />";
OutPutString += "Death: " + Session["DOD"].ToString() + "<br />";
OutPutString += "Country: " + Session["COOD"].ToString() + "<br />";
OutPutString += "State: " + Session["SOD"].ToString() + "<br />";
OutPutString += "Titles: " + Session["COD"].ToString() + "<br />";
}
}
}</blockquote>
Member 9142936
26-Oct-13 15:00pm
View
How would I configure this into my existing code, do I add this as part of my existing code under "protected void Page_Load(object sender, EventArgs e)", or do I delete my existing and build the "outputstring".
Show More