Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

dreynglar

@dreynglar
About
Posts
3
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • C++ again :-) (Does C# make you dumber?)
    D dreynglar

    I'm not real sure it makes you dumber, as you still have to know how to use the tool and solve the problem. But, I do think it certainly might make us all a little lazier in that we don't have to think about memory allocation/deallocation (at least for the most part), and you don't have to know the MFC calls to get the GUI up and running. (Admittedly, not thinking about stuff like stack space versus heap space may inhibit some from truly understanding what/how an application is behaving). I am kind of curious though, if .NET makes us dumber and lazier, then didn't Java blaze this trail originally? Not real sure about the boring part either. For me, understanding how the different pieces of the requirements puzzle fit together. I like putting the thing together and getting it functional, then adding some bells and whistles is fun. But, one person's boredom is another person's fantasy! One person's random thoughts on the subject... /dave If you always do what you always done, you'll always get what you've always got - Unknown

    The Lounge csharp c++ com question

  • Constraints [modified]
    D dreynglar

    I am a little confused by your problem statement versus what your code is attempting to do - the problem statement makes no mention of "custid" and given the names of the tables you mention, Author and Article, I'm not sure where a customer would fit in the picture. Nevertheless, I've put my interpretation of the tables you are working with below (please note that I didn't try very hard to get the PL/SQL statements correct, but they should get my idea across (and you may have different types associated with your column definitions, but the concepts should still work) CREATE TABLE Author ( AuthorID INTEGER FirstName VARCHAR(32) LastName VARCHAR(32) ) ADD PRIMARY_KEY CONSTRAINT PK_Author ON Author.AuthorID CREATE TABLE Article ( ArticleID INTEGER AuthorID INTEGER ArticleName VARCHAR(128) PublishDate DATETIME ) ADD PRIMARY_KEY CONSTRAINT PK_Article ON Article.ArticleID ADD FOREIGN_KEY CONSTRAINT FK_Author Article.AuthorID ON Author.AuthorID (please rememeber the SQL above is probably wrong!) If the tables are defined as I have assumed, then you are absolutely right and you should not be getting a primary key violation. But, I do wonder if you made Article.AuthorID the foreign key into the Author table AND the primary key in the Article table. If you did that, then you should indeed get a primary key violation when attempting to add records to the Article table. Hope this helps a bit... /dave ---------- If you always do what you always done, you'll always get what you've always got - Anonymous

    C# oracle question

  • back-up Windows service for database backup.
    D dreynglar

    For my money, SQL-DMO is the way to go. It allows you to stay within the confines of the application and is just a cleaner implementation (IMHO!) I attempted to invoke sqlo from within C# and it did work, but catching any exceptions was a bit awkward. /dave ---- If you always do what you always done, you'll always get what you've always got - Anonymous

    C# database question sysadmin
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups