Alpha Video Training
Results 1 to 4 of 4

Thread: sqlcmd utility

  1. #1
    VAR
    Real Name
    Bill Parker
    Join Date
    Apr 2000
    Location
    Dallas, TX
    Posts
    1,696

    Default sqlcmd utility

    Has anyone used this utility for sql server? I have no been able to get it to run. Attached image.

    I am trying to test why mssql can't find a file I am trying to import. My code is run from an xbasic scrip and points to mssql on another server. The csv file I am importing is on the AA box, but mssql says it can't find it. If I run that exact code in SSMS on the mssql box it works fine. So I want to test outside of Alpha to see if that helps isolate the problem.

    Bill.
    Attached Images Attached Images

  2. #2
    Alpha Software Employee Lenny Forziati's Avatar
    Real Name
    Lenny Forziati
    Join Date
    Nov 2001
    Location
    Alpha Software
    Posts
    4,678

    Default Re: sqlcmd utility

    The SQL server user will need access to the filesystem on your AA system. When you are interactively logged into the SQL system and using SSMS, you are probably using different credentials with greater access. Most people open SSMS and have it login with their Windows credentials and with SA access and this is well beyond what the user in your connection string would be able to do with a remote connection.

    Lenny Forziati
    Vice President, Internet Products and Technical Services
    Alpha Software Corporation

  3. #3
    VAR
    Real Name
    Bill Parker
    Join Date
    Apr 2000
    Location
    Dallas, TX
    Posts
    1,696

    Default Re: sqlcmd utility

    Lenny,

    Is it possible for that SQL Server user to get needed rights? This is the code I need to run from AA.
    Code:
    BULK INSERT Client
    FROM 'F:\Data\Parking_civil\sqlcsv_client.csv'
    WITH
    (  FORMATFILE = 'F:\Data\Parking_civil\sql_Client_Mod.fmt'
    )
    The F drive is mapped on both servers, so I can run identical code in both places.

    One odd wrinkle. I tried using a UNC path. That worked when running from one folder on the AA server. However, there are seven folders from which this needs to run, and UNC did not solve the problem on any of the other folders? And UNC would be a very cumbersome solution for me.

    Bill.

  4. #4
    VAR
    Real Name
    Bill Parker
    Join Date
    Apr 2000
    Location
    Dallas, TX
    Posts
    1,696

    Default Re: sqlcmd utility

    One more thought on his. It would be possible for Alpha to write the csv files to the sql box, but that would be a drag from a coding standpoint.

Similar Threads

  1. DBF utility
    By JetLi in forum Alpha Five Version 11 - Desktop Applications
    Replies: 8
    Last Post: 05-19-2013, 08:22 PM
  2. Branding Utility
    By doorscomputers in forum Alpha Five Version 11 - Desktop Applications
    Replies: 0
    Last Post: 09-29-2012, 05:35 PM
  3. Set AutoAdminLogon utility
    By fsi in forum Code Archive
    Replies: 0
    Last Post: 05-06-2011, 12:39 PM
  4. A5 Help utility
    By whanigsberg in forum Alpha Five Version 5
    Replies: 1
    Last Post: 07-23-2002, 01:41 PM

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
  •