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
V

VanityClaw

@VanityClaw
About
Posts
10
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Learning ForEach...
    V VanityClaw

    Not to poo-poo your question, but why are you writing code to do what sql already can? Anyway - I'm not sure I actually get your question. If you're looking for the db/table/column structure info, you can use queries (which I'll inlcude at the end of this post) - but I'd try looking at the Interop.SQLDMO objects. Slow & a bit old-fasioned (I'm sure) but it works (I use it in a code generator I made) pretty well. Aforementioned scripts: -- select * From information_schema.tables -- (Tables) -- select * From information_schema.columns -- (Columns) -- Select * From syscolumns -- (another way to look at columns) -- sp_fkeys([table] -- (fkeys for table) -- SELECT FK.Table_name 'FKTableName', CU.column_name 'FKColumnName', pk.table_name 'PKTableName', pt.column_name 'PKColumnName',cu.table_catalog FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS AS C INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS FK ON C.CONSTRAINT_NAME = FK.CONSTRAINT_NAME INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS PK ON C.UNIQUE_CONSTRAINT_NAME = PK.CONSTRAINT_NAME INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS CU ON C.CONSTRAINT_NAME = CU.CONSTRAINT_NAME INNER JOIN (SELECT i1.TABLE_NAME, i2.COLUMN_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS i1 INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS i2 ON i1.CONSTRAINT_NAME = i2.CONSTRAINT_NAME WHERE (i1.CONSTRAINT_TYPE = 'PRIMARY KEY')) AS PT ON PT.TABLE_NAME = PK.TABLE_NAME where fk.table_name = '[table]' -- (Pkeys for table) You're on your own with indexes and constraints (I'm not fiddling with that in my code generator). Does that help, or did I miss what you're asking altogether?

    C# database com html sql-server sysadmin

  • C# Irritation
    V VanityClaw

    Nah - This guys just whining.... Nothing better to do?

    The Lounge csharp c++ com design help

  • What's "convenient" for the developer is rarely good for the end user
    V VanityClaw

    I think I'll take your post with a 400 pound grain of salt... These tools can also result in GOOD developers being able to generate code faster to the benefit of the industry in far fewer lines and with minimal deployment issues. The real test of the "success" of a piece of software is how long it can stay in service, and a great portion of that is how easy it is to find people to work in the code and how uniform that code is. Throw a .02% hit to speed against a 20% increase in ROI and the money always wins - sorry. So - you keep hand-crafting your apps out of primal clay and the rest of us will adopt the resoundingly more sound approaches proffered by every single massively successful company on the planet. Eventually someone will be hired to rewrite your code from scratch, and they WONT use primal clay. Whether you like it or not, Wal-Mart is kicking the dog squeeze out of every mom-and-pop it gets near and there are like - what? - TWO hand-made car manufacturers? SURE Wal-Mart sells inferior products and SURE everyone would LOVE a hand-made car, but what counts when decisions are actually made? R. O. I. Is a .02% increase in speed going to offset a 20% decrease in development costs? If you're having a hard time with this one - go ask your CTO. There is also the idea that using a standard tool will result in standard code that a standard human with standard training can comprehend. If you're having trouble understanding the benifits of standardized production... Well... I'm not sure who you need to see on this one... The guy who changes your light bulbs? Anyway... The way we as software developers really affect the bottom line is by BALANCING production costs with the quality of the end product, and some of these tools help us do that. That said - you would be correct in saying that there are a lot of tools that simply aren't needed. They're like the pasta-cooker that you bought from a TV commercial that ended up in your garage or at Goodwill after sitting on your counter for a week, getting in the way while you boiled spaghetti in a pot... So - "Not all tools are created equal" - Sure! Of course! But that doesn't seem to be what you're saying. What you do seem to be saying sounds a bit too much like a reluctance to learn something new, with a dash of added job security tossed in for flavor.

    The Lounge csharp visual-studio linq tools discussion

  • What was the absolute worst programming job and why?
    V VanityClaw

    Ignorance is bliss - for the ignorant... Its hell for the rest of us. My fav was a job where nobody had ever figured out how to add dates... The result was a whole new month that occured yearly and a system in which every month had only 28 days. Nice!

    The Lounge question career

  • What was the absolute worst programming job and why?
    V VanityClaw

    I'm assuming you're young and/or just getting started in the workplace? If I'm right here - just go with it. You can learn loads for free on the internet (I've never paid a dime for training anywhere, and the training that my employers have paid for has been no better than training I was able to find at no cost), and you should take every opportunity to do it - piss on what your old-guy control-freak bosses are telling you. You can learn a TON here too... If you have a question - post it! Regardless of whatever faces people put on, we're all just here, and while some may be more organized than you or seem to be more "together", you're just as capable as anyone if you put the time into it. And - if you aren't happy where you are - get your resume out there! It makes very little sense to say that your worst job ever is the one you currently have and NOT do that.

    The Lounge question career

  • What was the absolute worst programming job and why?
    V VanityClaw

    Heh - Yeah: "Put a button", "Shove some data"... I decided to rename the "Post" method (which posted data to the DB) "Shove" on my base object. Id like to add that the words "Just" and "Only" should require a license to use.

    The Lounge question career

  • Am I a bad programmer?
    V VanityClaw

    Yeah... And I can think of more useful things that (reportedly) have a similar side-effect. :suss: JB

    The Lounge database help question learning

  • Am I a bad programmer?
    V VanityClaw

    I fail to see what cows have to do this topic.... :suss: JB

    The Lounge database help question learning

  • Am I a bad programmer?
    V VanityClaw

    I love short-sighted people.... They're easy to rob. :suss: JB

    The Lounge database help question learning

  • Am I a bad programmer?
    V VanityClaw

    You are not a "bad" programmer - not based on what you have said, anyway. I've been there, man - It sucks. I found it painful at best, and spent most of my time behind schedule because I never could remember to build in a day or two for dealing with (what I call) "The Stupid", and (after failng to lobby for meaningful change) I eventually just left for greener pastures. You have to be diligent, while you're where you are, to not let the bad habits and poor planning of your fellows undo your own talents. Keep up the skills they refuse to use and put them to work for you (if they wont let you put it to work for them) and use it to get a position at a more sensible company. There ARE sensible companies out here. :suss: JB

    The Lounge database help question learning
  • Login

  • Don't have an account? Register

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