Professional Web Applications Themes

is it difficult to call a script from a program?? - Microsoft SQL / MS SQL Server

This code is something I use from my vb.net program...can I make some of these in a script with Query yzer, save it as a script and then call it more efficiently from the program since the program has to do it for the customer? sqlstr = "BULK INSERT [Mink].[dbo].[TBL_Catalog]" + _ " FROM '\Server05\c\Catalog1.txt' WITH (FIELDTERMINATOR = '\t', KEEPNULLS, MAXERRORS = 100)" Thanks, Trint .Net programmer com *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!...

  1. #1

    Default is it difficult to call a script from a program??

    This code is something I use from my vb.net program...can I make some of
    these in a script with Query yzer, save it as a script and then call
    it more efficiently from the program since the program has to do it for
    the customer?
    sqlstr = "BULK INSERT [Mink].[dbo].[TBL_Catalog]" + _
    " FROM '\\Server05\c\Catalog1.txt' WITH (FIELDTERMINATOR
    = '\t', KEEPNULLS, MAXERRORS = 100)"
    Thanks,
    Trint
    .Net programmer
    com

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Trint Guest

  2. #2

    Default Re: is it difficult to call a script from a program??

    Hi Trint,

    It seems to me that what you want you can do with a stored procedure, for
    example:

    CREATE PROCEDURE Import_catalog
    AS
    SET NOCOUNT ON
    BULK INSERT [Mink].[dbo].[TBL_Catalog]
    FROM '\\Server05\c\Catalog1.txt' WITH (FIELDTERMINATOR
    = '\t', KEEPNULLS, MAXERRORS = 100
    GO

    and in your vb code:
    sqlstr = "EXEC Import_catalog"

    hth


    --
    Jacco Schalkwijk MCDBA, MCSD, MCSE
    Database Administrator
    Eurostop Ltd.


    "Trint Smith" <com> wrote in message
    news:phx.gbl... 


    Jacco Guest

  3. #3

    Default Re: is it difficult to call a script from a program??

    If you have lengthy scripts, then I would suggest that create seperate
    script files (.sql), then in your code, load these file in a string,
    then execution using ADO.Net Objects.

    It help you in maintenance of scripts, every time you changes scripts,
    you need to update script (.sql) file.

    Regards
    Hari Sharma, India

    Trint Smith <com> wrote in message news:<phx.gbl>... 
    hkvats_1999@yahoo.com Guest

Similar Threads

  1. Replies: 3
    Last Post: March 2nd, 07:47 PM
  2. How to call another program from DW. Extension help?
    By paul in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 5
    Last Post: February 27th, 11:20 PM
  3. actionscript for call email program
    By Kelly in forum Macromedia Flash
    Replies: 0
    Last Post: October 24th, 07:02 AM
  4. C call, in a Fortran subroutine, within a C main program
    By Mathieu in forum UNIX Programming
    Replies: 2
    Last Post: October 31st, 10:48 AM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139