PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET Connection issue

Reply

Connection issue

 
Thread Tools Rate Thread
Old 22-06-2006, 06:34 PM   #1
Earl
Guest
 
Posts: n/a
Default Connection issue


Scenario: I have 2 apps, one VB6, one VS2003 (VB.Net). From the same
workstation, on the same LAN, the VB6 app can connect to the SQL Server
(running on an XP Pro box), but the VB.Net app cannot. Connection strings
are functionally identical as shown below. I've read the connection issues
on Bill Vaughn's website, and while it's possible I'm overlooking something,
I'm not convinced that the connectivity should be any different for a VB6
app than it would be for a VB.Net app. Any thoughts beyond the usual?

VB6
strCN = "Provider=sqloledb;" & _
"Data Source=" & strDBServer & ";" & _
"Initial Catalog=" & strDBName & ";" & _
"Integrated Security=SSPI"

VB.Net

strCN As String = "data source=" & strDBServer & ";" & _
"initial catalog=" & strDBName & ";integrated security=SSPI;"


  Reply With Quote
Old 22-06-2006, 06:56 PM   #2
William \(Bill\) Vaughn
Guest
 
Posts: n/a
Default Re: Connection issue

Ok, what is in strDBServer? As you suspect, this should work (and it usually
does). Can you connect via the Server Explorer in VS.NET? If you can, can
you connect via the connectionstring it uses?
Are you referencing the server instance? Do you have a Try/Catch enabled?
What's the exception message? Of course, many of these messages are less
than helpful (pointing off to irrelevant issues).

hth

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

"Earl" <brikshoe@newsgroups.nospam> wrote in message
news:O%23%23AlIilGHA.4512@TK2MSFTNGP04.phx.gbl...
> Scenario: I have 2 apps, one VB6, one VS2003 (VB.Net). From the same
> workstation, on the same LAN, the VB6 app can connect to the SQL Server
> (running on an XP Pro box), but the VB.Net app cannot. Connection strings
> are functionally identical as shown below. I've read the connection issues
> on Bill Vaughn's website, and while it's possible I'm overlooking
> something, I'm not convinced that the connectivity should be any different
> for a VB6 app than it would be for a VB.Net app. Any thoughts beyond the
> usual?
>
> VB6
> strCN = "Provider=sqloledb;" & _
> "Data Source=" & strDBServer & ";" & _
> "Initial Catalog=" & strDBName & ";" & _
> "Integrated Security=SSPI"
>
> VB.Net
>
> strCN As String = "data source=" & strDBServer & ";" & _
> "initial catalog=" & strDBName & ";integrated security=SSPI;"
>



  Reply With Quote
Old 23-06-2006, 04:10 AM   #3
Earl
Guest
 
Posts: n/a
Default Re: Connection issue

strDBServer is the server name, in this instance, "EARL-XPPRO".

I *can* connect locally on the box with the VB.Net app. That is to say, the
SQLServer is also the development machine. Both the VB6 and the VB.Net app
can connect to the server. This is both in from within the IDE and from a
compiled application. Thus, it is certainly true that I can connect with
VS.Net using the server explorer.

The sole issue is connecting to the server on a non-development machine
within the LAN.

I do have a Try/Catch and it is telling me "SQL Server does not exist or
access denied."

"William (Bill) Vaughn" <billvaRemoveThis@nwlink.com> wrote in message
news:%23R3SzUilGHA.4512@TK2MSFTNGP04.phx.gbl...
> Ok, what is in strDBServer? As you suspect, this should work (and it
> usually does). Can you connect via the Server Explorer in VS.NET? If you
> can, can you connect via the connectionstring it uses?
> Are you referencing the server instance? Do you have a Try/Catch enabled?
> What's the exception message? Of course, many of these messages are less
> than helpful (pointing off to irrelevant issues).
>
> hth
>
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> __________________________________
>
> "Earl" <brikshoe@newsgroups.nospam> wrote in message
> news:O%23%23AlIilGHA.4512@TK2MSFTNGP04.phx.gbl...
>> Scenario: I have 2 apps, one VB6, one VS2003 (VB.Net). From the same
>> workstation, on the same LAN, the VB6 app can connect to the SQL Server
>> (running on an XP Pro box), but the VB.Net app cannot. Connection strings
>> are functionally identical as shown below. I've read the connection
>> issues on Bill Vaughn's website, and while it's possible I'm overlooking
>> something, I'm not convinced that the connectivity should be any
>> different for a VB6 app than it would be for a VB.Net app. Any thoughts
>> beyond the usual?
>>
>> VB6
>> strCN = "Provider=sqloledb;" & _
>> "Data Source=" & strDBServer & ";" & _
>> "Initial Catalog=" & strDBName & ";" & _
>> "Integrated Security=SSPI"
>>
>> VB.Net
>>
>> strCN As String = "data source=" & strDBServer & ";" & _
>> "initial catalog=" & strDBName & ";integrated security=SSPI;"
>>

>
>



  Reply With Quote
Old 24-06-2006, 09:20 PM   #4
William \(Bill\) Vaughn
Guest
 
Posts: n/a
Default Re: Connection issue

Step through the connection checklist on my blog--this might help.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

"Earl" <brikshoe@newsgroups.nospam> wrote in message
news:OAusbKnlGHA.2136@TK2MSFTNGP04.phx.gbl...
> strDBServer is the server name, in this instance, "EARL-XPPRO".
>
> I *can* connect locally on the box with the VB.Net app. That is to say,
> the SQLServer is also the development machine. Both the VB6 and the VB.Net
> app can connect to the server. This is both in from within the IDE and
> from a compiled application. Thus, it is certainly true that I can connect
> with
> VS.Net using the server explorer.
>
> The sole issue is connecting to the server on a non-development machine
> within the LAN.
>
> I do have a Try/Catch and it is telling me "SQL Server does not exist or
> access denied."
>
> "William (Bill) Vaughn" <billvaRemoveThis@nwlink.com> wrote in message
> news:%23R3SzUilGHA.4512@TK2MSFTNGP04.phx.gbl...
>> Ok, what is in strDBServer? As you suspect, this should work (and it
>> usually does). Can you connect via the Server Explorer in VS.NET? If you
>> can, can you connect via the connectionstring it uses?
>> Are you referencing the server instance? Do you have a Try/Catch enabled?
>> What's the exception message? Of course, many of these messages are less
>> than helpful (pointing off to irrelevant issues).
>>
>> hth
>>
>> --
>> ____________________________________
>> William (Bill) Vaughn
>> Author, Mentor, Consultant
>> Microsoft MVP
>> INETA Speaker
>> www.betav.com/blog/billva
>> www.betav.com
>> Please reply only to the newsgroup so that others can benefit.
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> __________________________________
>>
>> "Earl" <brikshoe@newsgroups.nospam> wrote in message
>> news:O%23%23AlIilGHA.4512@TK2MSFTNGP04.phx.gbl...
>>> Scenario: I have 2 apps, one VB6, one VS2003 (VB.Net). From the same
>>> workstation, on the same LAN, the VB6 app can connect to the SQL Server
>>> (running on an XP Pro box), but the VB.Net app cannot. Connection
>>> strings are functionally identical as shown below. I've read the
>>> connection issues on Bill Vaughn's website, and while it's possible I'm
>>> overlooking something, I'm not convinced that the connectivity should be
>>> any different for a VB6 app than it would be for a VB.Net app. Any
>>> thoughts beyond the usual?
>>>
>>> VB6
>>> strCN = "Provider=sqloledb;" & _
>>> "Data Source=" & strDBServer & ";" & _
>>> "Initial Catalog=" & strDBName & ";" & _
>>> "Integrated Security=SSPI"
>>>
>>> VB.Net
>>>
>>> strCN As String = "data source=" & strDBServer & ";" & _
>>> "initial catalog=" & strDBName & ";integrated security=SSPI;"
>>>

>>
>>

>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off