15,885,366 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 SomeGuyThatIsMe (Top 12 by date)
SomeGuyThatIsMe
10-Jul-14 8:42am
View
If you call thread.Sleep on a form it will usually lock the entire UI and make your app unresponsive until its done sleeping. Are you sure you dont want to use form.Hide or something to just make it go away until the user wants it again?
SomeGuyThatIsMe
15-Nov-13 15:07pm
View
I dont think you can insert a value into an identity column, you might have to change it to an integer. since the sp getnextId is replicating the functionality of an identity column. Its also possible that the sql i posted has a typo or two in it since i modified it in this reply box.
SomeGuyThatIsMe
15-Nov-13 13:28pm
View
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
@nextId = usp_getNextId
INSERT INTO aspnet_Genealogy(GenealogyId,FamilyName, MiddleName1, MiddleName2, MiddleName3, FirstName, DOB, Gender, COOB, SOB, COB, Newsletter, DateTimeGenealogy) VALUES(@nextId, @FamilyName, @MiddleName1, @MiddleName2, @MiddleName3, @FirstName, @DOB, @Gender, @COOB, @SOB, @COB, @Newsletter, @DateTimeGenealogy)
--possibly do not need?
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;
insert into aspnet_PersonalTree(GenealogyId, UserId) values(@nextid, @UserId)
END
I've modified your proc some, this text box is rather small so sorry if i added some typo's or missed something. I added the GenealogyId column to your first insert and the @nextId to be inserted as its value which is then used for the insert into personalTree with the userId. The catch is that you'll have to change genealogy to not use an identity column and create the getNextId procedure and a table to hold the values it deals with. The concept is basicly implementing your own version of an Identity column using a SP and table rather than the build in db functionality. Unless there is a way to get/reserve the next Id for the table so you can use it in multiple inserts.
SomeGuyThatIsMe
15-Nov-13 13:01pm
View
you dont assign @genealogyId anywhere, your select will also fail beacuse there is no link via the personalTree table yet. You need a way to get the genealogy id you just added for your insert w/out using a max. I never use ID columns i use a counter table and a sp to get the next value for whatever incremental id I want. that way i can call the SP and assign its return val to a varible in my main procedure and use it as many times as i want. i.e.
@nextId = usp_getNextId
insert into table(id..) values(@nextid...)
insert into joinTable(id, otherid) values(@nextId, @otherId)
hope that makes sense.
SomeGuyThatIsMe
15-Nov-13 12:06pm
View
beacuse your last insert is incomplete, it has no values clause or select statement after it.
SomeGuyThatIsMe
14-Nov-13 15:01pm
View
Here is how i define one of my test methods, the RequestFormat may be causing you an issue i've never used it.
[OperationContract (Name="xmlData")]
[WebInvoke (Method = "GET",
UriTemplate = "xml/{id}",
BodyStyle = WebMessageBodyStyle.Wrapped,
ResponseFormat = WebMessageFormat.Xml)]
string XMLData (string id);
SomeGuyThatIsMe
14-Nov-13 14:58pm
View
i've found that some newer browsers have issues with getting files that way, you may also have to add the application/pdf and application/pptx mime type to IIS for your website. I've had to do that for m4v and mp4/mpg files. I've also had to flush the buffer when writing files(may not apply here its been a while since i worked on the download code)
SomeGuyThatIsMe
14-Nov-13 14:14pm
View
http://lmgtfy.com/?q=access+control+allow+origin+header
where is the client that isnt working sitting?
SomeGuyThatIsMe
14-Nov-13 13:39pm
View
have you looked at the actual messages being sent back and forth, if you're using xml this may help. it was the first link in a quick search about your issue
http://stackoverflow.com/questions/9172380/wcf-datetimeoffset-compatibility
SomeGuyThatIsMe
14-Nov-13 13:26pm
View
Did you set the access control allow origin: * in your http headers on the server?
SomeGuyThatIsMe
14-Nov-13 13:24pm
View
what are you planning to join on? The only fields that could be close based on your tables would be a combination of names, but since genealogy has several fields and user has just the 2 you will have a very hard and unreliable time matching them, assuming you want to match on name. If you just want to say genealogyId 1 is assigned to userId 3 pass the user id into your SP and do a second insert or make a SP_AssignToUser that does the insert into the personalTree table.
SomeGuyThatIsMe
13-Apr-11 10:25am
View
It was simple enough to do w/out using a built in control so i never thought about it. The default button hadnt worked the first time i tried it, now it plus something else i've changed make it work now.
Show More