|
-
Nov 16th, 2017, 02:29 PM
#1
Thread Starter
Hyperactive Member
[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
-
Nov 16th, 2017, 02:37 PM
#2
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
-
Nov 16th, 2017, 04:32 PM
#3
Thread Starter
Hyperactive Member
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
-
Nov 16th, 2017, 06:17 PM
#4
Re: VB App - using SQL 2016
Could you show us the actual VB code?
-
Nov 16th, 2017, 07:33 PM
#5
Thread Starter
Hyperactive Member
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
-
Nov 16th, 2017, 07:45 PM
#6
Re: VB App - using SQL 2016
-
Nov 16th, 2017, 08:11 PM
#7
Thread Starter
Hyperactive Member
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
-
Nov 16th, 2017, 08:58 PM
#8
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.
-
Nov 16th, 2017, 09:04 PM
#9
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
-
Nov 16th, 2017, 09:07 PM
#10
Thread Starter
Hyperactive Member
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
-
Nov 16th, 2017, 09:36 PM
#11
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|