Search Results

Search found 4 results on 1 pages for 'matma'.

Page 1/1 | 1 

  • SmoApplication.EnumAvailableSqlServers returns server names but not instance names (but only on one

    - by Matma
    Hi, There are a number of questions about this and a number of possible causes and thus far ive tried them all with no success. situation: i have an app that needs a db to work, onstartup it does a SmoApplication.EnumAvailableSqlServers(false) to get all the instances on the network, shows the user a dropdown, they pick one and i go connect to my db on that server. all good problem: this works on my machine, the guys next to me and others. HOWEVER it doesnt work on one of the tech guys machines (and potentially others). we are all on the same network domain, physically connected (no wireless), all logged on with network user names, all running the same sql express 2005 sp3, though im using win7 the other guys are running xppro. MSSMS on all machines can see all the instances when you select "Browse for more". yet on this one tech guys machine it lists his local instance (since its hardcoded to) and all the network servers, but has no instances names? i.e. .sqlexpress server1 server2 server3 server4 but on my machine and others we get: .sqlexpress server1/sqlexpress server2/sqlexpress server3/sqlexpress server4/sqlexpress the code im using: ' .... some code ' this populates my datatable dtServers = SmoApplication.EnumAvailableSqlServers(False) '.... some code '.... then later i ShowServers(...) Private dtServers As DataTable = Nothing Private Sub ShowServers(ByVal SQLInstance As String) ' Create a DataTable where we enumerate the available servers cmbServer.Items.Clear() cmbDatabase.Items.Clear() ' If there are any (network listed) servers at all If (dtServers.Rows.Count > 0) Then ' Loop through each server in the DataTable For Each drServer As DataRow In dtServers.Rows ' Add the name to the combobox cmbServer.Items.Add(drServer("Server") & "\" & drServer("Instance")) Next End If 'To make life simpler (add the local instance of sql express): cmbServer.Items.Add(SQLInstance) ' select first item If cmbServer.Items.Count > 0 Then cmbServer.SelectedIndex = 0 End If End Sub now i know this uses udp and its not 100%, but how come his machine is 100% consistent in not showing remote instances, and mine is 100 consistent showing them. even a udl file on his desktop cant see them, regarldess of provider i choose to use? some of the suggestions are to uninstall and re-install, but that doesnt seem like a solution as i (and most others) can see the instances, but one guy cant. this suggests its not the remote sql server but rather the local machine. Notes: ive tried firewall 1433, 1434 i can connect using a udl with full SERVERNAME\INSTANCENAME the browser service is running locally and on the remote machine ive tried stopping and restarting both the browser service on the local and remote machine. Ideas?

    Read the article

  • If Then Else Statement Condition Being Ignored?

    - by Matma
    I think im going mad but can some show me what im missing, it must be some stupidly simple i just cant see the wood for the trees. BOTH side of this if then else statement are being executed? Ive tried commenting out the true side and moving the condition to a seperate variable with the same result. However if i explicitly set the condition to 1=0 or 1=1 then the if then statement is operating as i would expect. i.e. only executing one side of the equation... The only time ive seen this sort of thing is when the compiler has crashed and is no longer compiling (without visible indication that its not) but ive restarted studio with the same results, ive cleaned the solution, built and rebuilt with no change? please show me the stupid mistake im making using vs2005 if it matters. Dim dset As DataSet = New DataSet If (CboCustomers.SelectedValue IsNot Nothing) AndAlso (CboCustomers.SelectedValue <> "") Then Dim Sql As String = "Select sal.SalesOrderNo As SalesOrder,cus.CustomerName,has.SerialNo, convert(varchar,sal.Dateofpurchase,103) as Date from [dbo].[Customer_Table] as cus " & _ " inner join [dbo].[Hasp_table] as has on has.CustomerID=cus.CustomerTag " & _ " inner join [dbo].[salesorder_table] as sal On sal.Hasp_ID =has.Hasp_ID Where cus.CustomerTag = '" & CboCustomers.SelectedValue.ToString & "'" Dim dap As SqlDataAdapter = New SqlDataAdapter(Sql, FormConnection) dap.Fill(dset, "dbo.Customer_Table") DGCustomer.DataSource = dset.Tables("dbo.Customer_Table") Else Dim erm As String = "wtf" End If

    Read the article

  • If Then Statement Condition Being Ignored With Optimisations On

    - by Matma
    I think im going mad but can some show me what im missing, it must be some stupidly simple i just cant see the wood for the trees. BOTH side of this if then else statement are being executed? Ive tried commenting out the true side and moving the condition to a seperate variable with the same result. However if i explicitly set the condition to 1=0 or 1=1 then the if then statement is operating as i would expect. i.e. only executing one side of the equation... The only time ive seen this sort of thing is when the compiler has crashed and is no longer compiling (without visible indication that its not) but ive restarted studio with the same results, ive cleaned the solution, built and rebuilt with no change? please show me the stupid mistake im making using vs2005 if it matters. Dim dset As DataSet = New DataSet If (CboCustomers.SelectedValue IsNot Nothing) AndAlso (CboCustomers.SelectedValue <> "") Then Dim Sql As String = "Select sal.SalesOrderNo As SalesOrder,cus.CustomerName,has.SerialNo, convert(varchar,sal.Dateofpurchase,103) as Date from [dbo].[Customer_Table] as cus " & _ " inner join [dbo].[Hasp_table] as has on has.CustomerID=cus.CustomerTag " & _ " inner join [dbo].[salesorder_table] as sal On sal.Hasp_ID =has.Hasp_ID Where cus.CustomerTag = '" & CboCustomers.SelectedValue.ToString & "'" Dim dap As SqlDataAdapter = New SqlDataAdapter(Sql, FormConnection) dap.Fill(dset, "dbo.Customer_Table") DGCustomer.DataSource = dset.Tables("dbo.Customer_Table") Else Dim erm As String = "wtf" End If EDIT: i have found that this is something to do with the release config settings im using, i guesing its the optimisations bit. does anyone know of any utils/addons for vs that show if a line has been optimised out. delphi, my former language showed blue dots in the left margin to show that it was a compiled line, no dot meaning it wasnt compiled in, is there anything like that for vs? alternatively can someone explain how optimisations would affect this simple if statement causeing it to run both sides? EDIT2: using this thread as possible causes/solutions : http://stackoverflow.com/questions/2135509/bug-only-occurring-when-compile-optimization-enabled. It does the same with release = optimisations on, x86, x64 and AnyCPU Goes away with optimisations off. Im using V2005 on a x64 win7 machine, if that matters. Thanks

    Read the article

  • Visual Studio 2010 Bootstrap Folder?

    - by Matma
    We currently run a VS2005 app/environment and im investigating upgrading to 2010. But before i can say yes its all good, go buy bossman... I have to confirm that a bootstrap for a thridparty driver install which is included on our installation cd can be used/included (its a usb security dongle so drivers MUST be included/setup for our app to run). It is in the list of available pre-reqs but i didnt put it in the vs2010 bootstrap folder so is this coming from my vs2005 install? or the fact that i had previously selected it in the installer and its saved/loaded that in vs2010? Either way its got a little error icon and says its not found so i get errors on build. I want to resolve this and have it in the list of available pre-reqs as we did for 2005. i.e. copy it to the C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper folder... But i cant seem to find where the bootstraps are for vs2010? does it not use them? Naturally ive searched the entire vs folder structure for appropriate files/folders but nothing? Where/How is this now done?

    Read the article

1