Jump to content

dman

Member
  • Posts

    708
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Posts posted by dman

  1. thanks dman,

    with a little modification, ur code works very well.

    case close.

    p.s: i perfer not to get into detail, but when then people above you make certain decision (regardness good db practice or not)  its kindda hard to go against it :P  heheheh

    Cool.

    I know what you mean about project managers. I once had one that would not allow me to use SQL syntax with Visual Foxpro because XBase didn't have it, so I didn't need it. (read, "he didn't know it")

  2. You are right, good skill to have. Everything is in a DB these days and all RDBMS work pretty much the same, so anything you learn is fairly generic knowledge.

    CREATE TRIGGER <trigger_name>

    ON <table_name>

    FOR INSERT

    AS

      DECLARE @pk int
      DECLARE @link varchar(20)
      SELECT @pk = (SELECT pk_id FROM Inserted)
      SELECT @link = (select substring(birthdate,1,2) +    substring(birthdate,4,2) + substring(birthdate,7,2) +    right(ssn,4) FROM Inserted)
      UPDATE <table_name> SET linkid = @link WHERE pk_id = @pk

    ok, I am rusty at SQL Server, I have been using mySQL for a while, so this may not be quite right, but should give you the idea. Basically the "As" part will execute whenever a row is inserted. the "Inserted" field is special temp table sql server makes with fields from last insert.

    replace "pk_id" with your primary key field

    http://www.informit.com/guides/content.asp...&seqNum=70&rl=1

    what polices and guildlines do you have to follow that prohibit correct DB design?

  3. That is correct... trigger.

    The language of SQL Server is called "Transact-SQL" or "T-SQL"

    syntax is something like

    CREATE TRIGGER <trigger_name>

    ON <table_name>

    FOR INSERT

    AS
         <tsql code here>

    but if you are just trying to make a link for the table you should use a "dumb" primary key, meaning it is only unique identifier, not related to row data in any way. Then you reference this as foreign key in child table. I will elaborate if you are interested.

  4. No inconvenience, that's what MSFN is for! :yes:

    look at "source" in browser you will see you still have many blank spaces. It will wrap on the first one it Finds. try the php str_replace() function to convert all " " to  

    you also should pad your individual data item strings to standard length so columns line up, else put them in a table.

    http://us2.php.net/manual/en/function.str-replace.php

    $htmlout = "1 0000-00-00  Missouri Bad Jackson      3.3113E+11  3208 4 S Fork Bad River ......."

    $htmlout = str_replace(" ", " ", $htmlout);

    echo $htmlout

  5. Its been said before i believe.

    Only the OEM, Vol, and retail version's of XP are supported by XPCREATE.

    The Upgrade CD is different in that you cannot (as I recall) boot the CD (i.e. you can only run the update from within a version of Windows) so it cannot be used.

    Whether you can use XPCREATE to make a updated version of the Update CD, I cant say I'm afraid as I dont have it to try that.

    Regards

    Nath.

    That's not quite right. You can boot and do clean install from upgrade CD, it will just ask you to insert your previous version cd if it doesnt find it on the drive. XPCREATE works fine with upgrade CD.

  6. First, please use code tags. (or quote tags if code tags alter the code, like they did when I tried them here)

    At a glance it looks like this string is wrong.

    $result=MYSQL_QUERY("insert into sitelocation (SiteLabel,SiteDate,Watershed,SubBasin,Country,

    DigitHydrologicUnitCode_6,DigitHydrologicUnitCode_

    8,DigitHydrologicUnitCode_11,GAPSegmentType,

    GAPSegmentLength,StreamOrder, StreamName, UTMzone,UTMeast,TMnorth,LegalDescription,

    OmernikEcoregion,BaileyEcoregion,NearestTown,River

    Mile, DrivingDirections)

    values

    ('SiteLabel','SiteDate','Watershed','SubBasin','Country',

    'DigitHydrologicUnitCode_6','DigitHydrologicUnitCode_8','DigitHydrologicUnitCode_11','GAPSegmentType',

    'GAPSegmentLength','StreamOrder', 'StreamName','UTMzone','UTMeast','TMnorth','LegalDescription',

    'OmernikEcoregion','BaileyEcoregion','NearestTown','RiverMile','DrivingDirections')");

    if( mysql_query( $result ) )

    you are including "mysql_query" in the actual query string.

    try it like

    $result="insert into sitelocation (SiteLabel,SiteDate,Watershed,SubBasin,Country,

    DigitHydrologicUnitCode_6,DigitHydrologicUnitCode_

    8,DigitHydrologicUnitCode_11,GAPSegmentType,

    GAPSegmentLength,StreamOrder, StreamName, UTMzone,UTMeast,TMnorth,LegalDescription,

    OmernikEcoregion,BaileyEcoregion,NearestTown,River

    Mile, DrivingDirections)

    values

    ('SiteLabel','SiteDate','Watershed','SubBasin','Country',

    'DigitHydrologicUnitCode_6','DigitHydrologicUnitCode_8','DigitHydrologicUnitCode_11','GAPSegmentType',

    'GAPSegmentLength','StreamOrder', 'StreamName','UTMzone','UTMeast','TMnorth','LegalDescription',

    'OmernikEcoregion','BaileyEcoregion','NearestTown','RiverMile','DrivingDirections')";

    if( mysql_query( $result ) )

  7. To make sure I understand...
    The key is not stored on the cd anywhere. All you need is a valid OEM key to go with an OEM disk, or retail key for retail disk. As long as the disk matches the key you can install, just enter your legal key when setup asks asks.

    The original Disk I had was WinXP Home Edition. Can I assume that ALL disks of this version are exactly alike ? So then the only thing I need to do is get a disk of the exact same version of the XP disk and everything should be good from there ?

    I've been reading about it here & there, and it sounds like the (for lack of a better word) "encryption" for the Product Keys is dependant on which version you are using. I read a bit about creating your own (seemingly valid) encryption keys and someone said something like that.

    Anyways, for my immediate purpose, I just need confirmation that I understand the situation. My product key should work just find for any copy of XP Home that I should find, right ?

    One question this raises is what about the XP disks that are sold with either SP1 or SP 2 pre-installed? I would think that if an original (legal) Product key would work for an XP disk that didn't have them pre-installed (like mine) then it should also work on a disk that has SP2 slipstreamed, right ?

    Because I would like to slipstream SP2 into the disk, if possible. I did it before with my original disks data, so I should have no problem doing it with another disk, correct ?

    This causes me to then wonder about the idea that Product Keys are different based on which disk you are using. Does this idea only apply to Hone vs. Pro, or do the functionality of the Product Keys also depend on which Service Pack is involved.

    Thanks for the advice, above. I will read the thread from the link about and also thanks in advance for the latest questions.

    Johnny

    There are actually three unique versions, OEM (original equiptment mfgr), Retail and VLK (volume key). You probably have a key for OEM version if XP was pre-installed on your old machine. As long as you have a OEM install disk key will work.

  8. The key is not stored on the cd anywhere. All you need is a valid OEM key to go with an OEM disk, or retail key for retail disk. As long as the disk matches the key you can install, just enter your legal key when setup asks asks.

  9. Are there any programs like games that could be written to utilize certain API functions only available in Windows 2K/XP, but not available in Windows 9X?

    You mean like on purpose? Whether you need them or not? Sure if you write the program you can include any functions you want, NT only included. If goal is to deny it running on 9x just make check that it is running NT and exit if it is 9x. This is what polite programs that use NT only API do.

×
×
  • Create New...