Results 1 to 11 of 11

Thread: [RESOLVED] VB App - using SQL 2016

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Hendersonville , NC
    Posts
    260

    Resolved [RESOLVED] VB App - using SQL 2016

    Help ...

    I have a windows application I want to park on a 2012 R2 windows server. I am using SQL 2016. I have the named instance and all that correctly in the application. If I run the exe ON the server ... everything works like a champ.
    However .. If I go to a pc client on the network and try to execute the same application via a shortcut it craps out. Get different errors but mainly points to invalid connection.

    Security ?????

    HELP

    gollnick
    William E Gollnick

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: VB App - using SQL 2016

    What does the connection string look like?
    Also, historically, .NET apps operating over a network like that are pretty bad performers. If you want to run it from client PCs, your best bet is to have a copy of it on each PC that's going to run it.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Hendersonville , NC
    Posts
    260

    Re: VB App - using SQL 2016

    Connection string...
    DclSrParm WhichLibrary *String
    DclSrParm UserIdIn *String
    DclSrParm PassWordIn *String
    Library = WhichLibrary
    dbname = %Trim(MyServer)
    User = UserIdIn.ToUpper()
    Password = PassWordIn.ToUpper()
    ConnectString = "Server=" + dbName + ";" + "DataBase=" + %Trim(Library) + ";" + "Integrated Security=SSPI"
    *This._ConnectString = ConnectString
    *This._Connection = *New SqlConnection( ConnectString )
    conn = *New SqlConnection( ConnectString )
    (2:56:17 PM) [email protected]/15D1AF90: where dbname is "DHM770M2\suncrestvillage"
    (2:56:36 PM) [email protected]/15D1AF90: database is Property_Manage
    (2:56:48 PM) [email protected]/15D1AF90: userid is "pgollnic"

    So you recommend having the exe on the client and just point the database to the sql on the server....

    gollnick
    William E Gollnick

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: VB App - using SQL 2016

    Could you show us the actual VB code?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Hendersonville , NC
    Posts
    260

    Re: VB App - using SQL 2016

    BegConstructor Access(*Public)
    DclSrParm MyServer Type(*String)
    DclSrParm WhichLibrary *String
    DclSrParm UserIdIn *String
    DclSrParm PassWordIn *String
    Library = WhichLibrary
    dbname = %Trim(MyServer)
    User = UserIdIn.ToUpper()
    Password = PassWordIn.ToUpper()
    ConnectString = "Server=" + dbName + ";" + "DataBase=" + %Trim(Library) + ";" + "Integrated Security=SSPI"
    *This._ConnectString = ConnectString
    *This._Connection = *New SqlConnection( ConnectString )
    conn = *New SqlConnection( ConnectString )
    EndConstructor

    Like I said. ..executed from the server on the server connects and works fine. Access the exec over network. ... error connecting.
    life
    William E Gollnick

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: VB App - using SQL 2016

    That's not VB.NET code.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Hendersonville , NC
    Posts
    260

    Re: VB App - using SQL 2016

    It all complies into machine code via vs compiler. .. syntax a little different but translates the same. What would be your suggested connection string? 2016 sql and 2012 r2 server... any help would be appreciated. .

    thanks

    gollnick
    William E Gollnick

  8. #8
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: VB App - using SQL 2016

    My suggestion would be to not ask questions that have nothing to do with VB.NET in a forum dedicated to VB.NET. Abusing this forum to get more views makes it less useful for what it is intended.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  9. #9
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: VB App - using SQL 2016

    So does VB6 code, but it's those syntatic differences that get in the way. The subject of the post clearly says "VB App" ... If it isn't VB.NET, then it doesn't belong in the Vb.NET forum, if it isn't VB6, then it doesn't belong there either. IT belongs somewhere else. That said, it's hard to tell you where to go with the connection string, because we're not sure what language you're dealing with. Does it work the same as .NET where the provider is handled in the connection for you? Or is it like VB6 where the provider has to be specified?

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Hendersonville , NC
    Posts
    260

    Re: VB App - using SQL 2016

    I'll write the same thing in vb.net tomorrow. ..repost it here. ...and ask the same questions. . Why does it run directly on the server but not as a shortcut over the network. Thanks
    gollnick
    William E Gollnick

  11. #11
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [RESOLVED] VB App - using SQL 2016

    If you have VB.NET code that has been tested and confirmed to not work as expected, I'll be happy to help you fix it. Be sure to provide SPECIFIC error messages though. There's not really any good reason not to be able to do that.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

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



Click Here to Expand Forum to Full Width