SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Executing SQL Script using MSDE

    Curious, anyone ever executed a sql script from the command line to populate a table within MSDE, i.e.,

    C:>osql -S computername\NetSDK -d JokePoint -E -i path_to_script

    When I enter this in the command prompt nothing fills, do I need to specify a table somehow?
    Ryan Butler

    Midwest Web Design

  2. #2
    SitePoint Guru MikeBigg's Avatar
    Join Date
    Jun 2004
    Location
    Reading, UK
    Posts
    970
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes you need to specify a database and a table.

    This is usually done in the script file. For example:

    use [mydatabase]
    GO

    insert into atable ( ... ) values ( ... )
    GO

    etc


    What does the first part of your script look like?

    Mike

  3. #3
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    INSERT INTO Product(Name,Description,Price,ImagePath,OnCatalogPromotion,OnDepartmentPromotion) VALUES('Santa Costume','A Santa Claus costume kit consisting of a jacket, a pair of trousers, a hat, a belt, and even a beard. All you need is a sack full of Joke Shop Goodies as presents. Why not order some gloves, boot covers, and perhaps some body stuffing?',14.99,'20841.jpg',1,0)
    It will fill an already existing database and table named Products. I'll try some of your suggestions to see if I can get it going.
    Ryan Butler

    Midwest Web Design

  4. #4
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just did it the hard way, went through Web Data Admin in MSDE, loaded the query(s) and I'm good now. Thanks.
    Ryan Butler

    Midwest Web Design


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •