I have a VB6 app that uses ListAvailableSQLServers to collect the server names on a computer. On Windows XP, however, the default instance shows up as (LOCAL) while @.@.servername is the computername. When my app tries to select from (LOCAL).db.dbo.table, it gets "SQL Server does not exist or access is denied." If it selects from "computer".db.dbo.table all is well.
Any thoughts how to get around this? Aliasing does not work...
Thanks in advance.Plz first make sure the SQL service is running by checking it under the Services group in the Management console and what startup service account it's using; can u connect to that instance thru Query Analyzer? If yes then type in
select serverproperty('servername').
Check the mode of Authentication u r tryin to connect to SQL thru. Post some details about the startup-service account etc.
Howdy.|||Since the (local) server is nearly "hardwired" into the list, there isn't a good way to avoid it. The machine name should still appear in the list anyway. I usually just put in code to ignore both the IP address and the constant (local) as I iterate through the list of servers.
-PatP|||Sorry, SPE (Stupid Programmer Error); one of my ADO connection strings had the data source hardcoded (leftover from testing). Thanks both...|||Hmmm... We know those as ID10T errors. Same difference!
Glad you are working now!
-PatP
Showing posts with label vb6. Show all posts
Showing posts with label vb6. Show all posts
Monday, March 19, 2012
Friday, March 9, 2012
List of NTGroup users
Hi!
I need to find out list of users that belong to a NT Group. Is there any
stored procedure or query in Sql server that I can use?
We have vb6 application that needs to list all users so we can save
information to our database regarding a specific users instead of the whole
group.
BR,
Johanna TurkuYou could use xp_logininfo, e.g.:
exec master..xp_logininfo 'Domain\NTGroup', 'members'
You can find more information on xp_logininfo in books
online.
-Sue
On Fri, 15 Oct 2004 03:15:12 -0700, "Sebitti"
<sebittionline@.companysebitti.fi> wrote:
>Hi!
>I need to find out list of users that belong to a NT Group. Is there any
>stored procedure or query in Sql server that I can use?
>We have vb6 application that needs to list all users so we can save
>information to our database regarding a specific users instead of the whole
>group.
>BR,
>Johanna Turku|||Thanks Sue,
This was the answer I was looking for :o)
BR,
Johanna
"Sue Hoegemeier" wrote:
> You could use xp_logininfo, e.g.:
> exec master..xp_logininfo 'Domain\NTGroup', 'members'
> You can find more information on xp_logininfo in books
> online.
> -Sue
> On Fri, 15 Oct 2004 03:15:12 -0700, "Sebitti"
> <sebittionline@.companysebitti.fi> wrote:
>
>
I need to find out list of users that belong to a NT Group. Is there any
stored procedure or query in Sql server that I can use?
We have vb6 application that needs to list all users so we can save
information to our database regarding a specific users instead of the whole
group.
BR,
Johanna TurkuYou could use xp_logininfo, e.g.:
exec master..xp_logininfo 'Domain\NTGroup', 'members'
You can find more information on xp_logininfo in books
online.
-Sue
On Fri, 15 Oct 2004 03:15:12 -0700, "Sebitti"
<sebittionline@.companysebitti.fi> wrote:
>Hi!
>I need to find out list of users that belong to a NT Group. Is there any
>stored procedure or query in Sql server that I can use?
>We have vb6 application that needs to list all users so we can save
>information to our database regarding a specific users instead of the whole
>group.
>BR,
>Johanna Turku|||Thanks Sue,
This was the answer I was looking for :o)
BR,
Johanna
"Sue Hoegemeier" wrote:
> You could use xp_logininfo, e.g.:
> exec master..xp_logininfo 'Domain\NTGroup', 'members'
> You can find more information on xp_logininfo in books
> online.
> -Sue
> On Fri, 15 Oct 2004 03:15:12 -0700, "Sebitti"
> <sebittionline@.companysebitti.fi> wrote:
>
>
Friday, February 24, 2012
list box is not displaying
I have a list box getting a filtered recordset from a stored procedure using ADO calling in VB6.
The recordset returns the two records with correct values. The problem is it is not displaying in the list box. Why? I tried using .additem property but it is not available in Access 2000. Can anyone help me with this?
Function ..
Dim rs_get_defect_desc As New ADODB.Recordset, lot_n as integer
Set lot_n = 4051
Rs_get_defect_desc.Open "EXEC spGet_desc_defect @.lot_n=" & lot_n, CurrentProject.Connection
Do While Not rs_get_defect_desc.EOF
lstbox.RowSource = rs_get_defect_desc(0) & " " & rs_get_defect_desc(1)
rs_get_defect_desc.MoveNext
LoopI am confused, - is it VB6 or Access?
The recordset returns the two records with correct values. The problem is it is not displaying in the list box. Why? I tried using .additem property but it is not available in Access 2000. Can anyone help me with this?
Function ..
Dim rs_get_defect_desc As New ADODB.Recordset, lot_n as integer
Set lot_n = 4051
Rs_get_defect_desc.Open "EXEC spGet_desc_defect @.lot_n=" & lot_n, CurrentProject.Connection
Do While Not rs_get_defect_desc.EOF
lstbox.RowSource = rs_get_defect_desc(0) & " " & rs_get_defect_desc(1)
rs_get_defect_desc.MoveNext
LoopI am confused, - is it VB6 or Access?
Subscribe to:
Posts (Atom)