Hello,does anybody know if it at all possible to contact the DHCP server from a VB.NET project with the aim of passing a computer name and it returning the MAC address (and last known IP address). The purpose is that the machine may be switched off which is why we need to go to DHCP Server.Basically need to know the Libraries to imports and get started.
I have a simple TCP Client/Server application that ties two pcs on a lan together. This has worked great for many job sites but the most recent has an IT manager that will not allow me to set a static ip address on the server pc.Basically, I was wondering if there was a nifty way to have the client find the server.
I am developing a windows application for my guys on helpdesk to use with our clients. It is going to be installed on the clients' pc's. One of it's purposes is to display all IP info of a computer. Such as the client's IP address, DNS IP address, DHCP IP address, and Default Gateway IP address, but I can only get it to give me the IP address of the host and no addresses of the DNS, DHCP, or Default Gateway. I know that I could run an ipconfig /all and pull the results into the application, but I would like to have it laid out more simply for it to be easier to read for the clients in case we are walking them through some troubleshooting over the phone and we need their IP information. I do not require and am not requesting any source code.
I'm trying to use the DHCP API (using the references on pinvoke.net) to retrieve a computer's MAC address when given the IP address but I can't get the code to work. I've run all the C# code on pinvoke.net through the C#-to-VB converter but I'm stuck now.
Here's what I have so far. The value of res is always 5 (should be 0). Thing is, I can't find any documentation on what the return codes mean
vb Private Sub GetMACDim client As String = "126.96.36.199" Dim server As String = "0.0.0.0" Dim si As New NativeMethods.DHCP_SEARCH_INFO si.SearchType = NativeMethods.DHCP_SEARCH_INFO_TYPE.DhcpClientIpAddress si.ClientIpAddress = Convert.ToUInt32(StringIPAddressToUint32(client)) Dim res As UInteger Dim oInfo As IntPtr
Below I have the create script for a table. It works great but for some reason it doesn't include the Keys, Constrains, Triggers or Indexes. I am having little luck finding documentation on how to do this. Most of the example I can find is in C# as well.
At my house we got 6 computers and 5 laptops. Not I want to be able to control them remotely without using external dekstop management or something else. So i can control when my kids can use the computer or not
So I came up with the idea of creating an irc server that listens to commands that I type from my main computer. The commands are no problem for me to program but the irc server itself looks pretty hard. I've been looking on google but cant find a good source to learn it. some other ideas than using irc protocol?
How do I transfer data from Excel 2007 into Microsoft SQL Server Management Studio Express as shown below? I try copy and list of data in excel as shown in the screenshot.. But when I paste in Microsoft SQL Server Management Studio Express.. Only the first result is past inside..
I've developed an application in VB2008 express and have installed it to another PC. The installation has put the mdf file in c:documents and settingsuserappsdata.I want to attach this with SQL Server Management studio but when I try to browse to the file in order to attach it, I find I can't browse further then C:documents and settingsuser.
We are thinking about changing our current database system, MS Access 2007 front end and MS SQL Server 2005 backend to using a higher level language such as Visual Basic .Net. I wonder if this is the BEST solution for data management? Currently, among others, we have two big database programs that handle more than two hundred users and it's crashed often. That's the reason we think about changing to something that can handle these database programs effectively preferably using MS technology such as .Net.
I have a DropDownList that pulls values from a table in sql server. I want the dropdownlist to populate the list of values based on a selection by the user but also display the contents of the rest of my table in case they need to change something. For ex:
ddl1 has values of: 1, 2, 3, 4, 5 user selects 5, so the value displayed in ddl2 is five, but if you exand the ddl2 you will also see the values of one, two, three, four...
This is the code in my load event...
If Not IsPostBack Then result = dal.dbConnect(DAL.dbType.SqlServer, ConfigurationManager.AppSetting("SQLServerConnection"))
I have a blog (non wordpress or anything) written in vb.net. At the moment I pull my data back just by bringing in the last 10 results: SELECT TOP (@bAmount) bCategory, bID, bImageURL, bInactive, bLargeImage, bPost, bPostDate, bPostTitle, bPoster, bStyle FROM Blog ORDER BY bID DESC
I'm just going to have back and forward buttons to go through the posts, but how do I do the SQL for say post 10-20 last posts rather than the IDs between the posts. (The IDs are incrimental, but can jump significantly).
So basically when I click back it gives me 10 posts that are 10 older than the first page results?
Im having an issue with a certain query,Dim nwLat As Double Dim Ssql As String
nwLat = nwLatHidden.Value Ssql = " select * from customer where latitude < " & nwLat TFRcount.SelectCommand = Ssql TFRcount.SelectParameters.Clear() TFRcount.DataBind()
All it does is refresh the page and does nothing; it should populate a chart. However when I replace nwLat with a value (eg where latitude = 56) it works perfectly and populates the chart. Any ideas what's wrong with nwLat?
EDIT: I switched nwLat to long and it works; however it only takes the number up to the decimal and ignores the rest. Any way to fix? (eg as double 56.764746 and long 56)
At the moment I am using Access & an OleDb connection to store data. I went down this route originally because I though that this was the best way for applications that I am distributing to my clients.
I would prefer to use something like SQL Server but is this a good idea for software I am distributing? Does the average Joe's PC have SQL Server pre-installed? If not, I suppose I can provide them with a link to download it for free?
Is there any better alternatives to Access / SQL Server?
the total number of records for the previous day where the feed is, 1, 3 and 5 i.e.the feeds I need to retrieve totals for will just be selected based on what I need for instance it could be box4 and box 5...not specifically odd and even...I hope this makes it more clearer..what I have for all records:
select sum(count) as [total] from PostTable where Cast(dateinserted as DATE) = CAST(getdate()-1 as DATE)
I'm writing a program that will be able to start a window service (SQL Server) on demand. Some of our servers have both SQL 2000 and SQL 2005 installed. I'd like to run a WMI query on the server (either local or remote) to determine how many instances of SQL are installed, and then start the latest version of SQL server. Install paths to SQL instances / configs can be different due to SAN configuration, so I need to use a WMI query to get the services.
I was using the following query- "SELECT * FROM Win32_Service WHERE Name LIKE '%MSSQL$%' OR Caption = 'MSSQLSERVER' OR Name = 'SQLSERVERAGENT' OR Name LIKE '%SQLAgent$%'" This returns a bunch of SQL services, so I decided to cut it down- "SELECT * FROM Win32_Service WHERE Name LIKE '%MSSQLSERVER%' OR Caption = 'MSSQLSERVER'" But that query still returns other services (i.e. FullText, Active Directory Helper, etc.) that I don't want. Is it possible to create a WMI query to only look for MSSQLSERVER and SQL Server Agent services? Am I missing something?
I am working on creating a web app that will query event logs on internal servers for events using a specific ID. Since most of the servers are running Windows Server 2003, I cannot use the preferred System.Diagnostics.Eventing.Reader method that I was hoping to use.
I've seen the mention of using WMI, but would like to avoid this if possible. I have dabbled with the System.Diagnostics class but cannot seem to get it working when running on a server. It is able, when testing locally, to query my event log, but displays nothing when put on the final server. There is no error that is displayed after the program is ran.
I am trying to create a CLR SQL Stored procedure that uses a query and adds the results to a list in VB.NET. Through debugging I determined that my add statement for the reader into the List is somehow converting my data types and throwing an error when I attempt to execute the compiled Stored Procedure.The columns I am querying are Integers
I wrote a procedure that builds a DataTable in memory using data stored on our DB2 database. The function builds a Multi-Level Bill of Materials (BoM), meaning that the data cannot simply be queried. The function works great and returns a nicely arranged DataTable object. However, I then need to query the in-memory DataTable against other tables on our server. What would be the best way to approach this problem? Should I make a DataTableAdapter for the Server tables and then build a DataView? I don't have too much experience yet with Data objects. (By the way, I looked into LINQ to DB2 and even installed IBM's addin's, but our server doesn't seem to support it at this time.)
I've got a datagrid with checkboxes which calls a routine called checkbox_CheckedChanged. So far, so good. I've managed to get it to work out the value of another column in the dataview, which allows me to ascertain the id of the row I'm dealing with. I'm trying to get it to change the value of the column which defines the initial value of the checkboxes, but the SQL I've written doesn't work when called by vb.net - it does work when entered manually into SQL server, however. Here's my code behind:
I am creating an ASP.Net page with VB.Net codebehind. I am using a class variable to hold data (named ods see below) from a SQL Server query so I do not have to keep going back out to the server. The class variable gets loaded ok and I populate a grid data with this dataset. However when I need to go back in and reference the dataset again, I get an error and I come to find out my dataset no longer holds the data.
Here is my declaration in my code behind: Partial Public Class LotTrackingMain Inherits System.Web.UI.Page Private con As SqlConnection = Nothing Private ods As New DataSet
I'm working on an ASP.NET 4.0 site, which I inherited ownership of. It has a number of existing LINQ datasources pointing to individual tables. For example, to the Patient Encounter Summary table in SQL Server. The problem is in displaying the data there. It's a normalized database, so that table contains (for example) the provider ID, rather than the provider name.
It's simple enough to join the Patient Counter Summary to the Providers table (in SQL)... but how does one do that in ASP.NET? I'm not sure of the correct nomenclature, but the 'mid layer' is VB.
I have a big stored procedure that I run. At the end its supposed to select a singe value to say if it succeeded or not, so I run the query as
Dim Command As New SqlCommand(SqlString, Conn) Return Command.ExecuteScalar()
Which works. However there is an error in my stored procedure. I know its causing an error because the logic in the stored procedure rolls back the transactions, and after the Execute Scalar call, my transaction count is down to 0 and the my data hasn't changed. However no SQL exception was generated.
The strange part is, I changed the code to grab all the result sets from the SP to see if I could get more information. So I called the same SP like this,
Dim DAObj As SqlDataAdapter = New SqlDataAdapter Dim CommandObj As SqlCommand = New SqlCommand(SQLString, Conn) DAObj.SelectCommand = CommandObj Dim DS As New DataSet() DAObj.Fill(DS)
When I run this, with the exact same sql as before, executing the exact same stored procedure, this time I get an SQL exception because one of my nested SP calls was missing required parameters. So what could cause this? Why would running it one way produce an error and the other way have the error but not report it? Is the difference on purpose, or some kind of obscure bug in ADO.Net?
I have a working game server browser project in VB.NET 2008 and I'm trying to fix the CS 1.6 and CS-Source query protocols. Where can I go to learn how to query a game server? The code worked in 2004 and now I want to update it [Code]
I'm attempting to make a generic query executer function. I want to be able to send it a query string and have it return a two-dimensional array containing the results. Below is my code for how to do it with a (9,x) array. How can I do it with an (y,x) sized array? Also, I feel like there must be a more efficient way to do this..
I want the Indexing server Query to Search any type of document by document name.Let assume i have ..
test.ppt test.pdf test.doc and so on.
If I enter the test name in my search text box the , I want the search result with these file. I am using the vb.net with the help of MicroSoft Indexing Serice. I need the query of MicroSoft Indexing Serice for search any type of document by document name or title.
Public Function GetSearchResultFromIndexServer(ByVal strSearchString As String, ByVal sPath As String, ByVal sLookIn As String, ByVal sSortBy As String, _
I've spent a whole day on this already without figuring it out. I'm hoping somebody can help me translate the following MySQL query to work for SQL Server 2005:
SELECT MAX ( messages.date ) AS maxdate, topics.id AS topicid, topics.*, users.* FROM messages, topics, users WHERE messages.topic_id = topics.id AND topics.user_id = users.id AND topics.forum_id = " . $forumid . " GROUP BY messages.topic_id ORDER BY maxdate DESC
$forumid is a QueryString value defined in the following VB.NET code-behind code:
This is my first time using SOAP with anything. I have an interesting situation, I have to send query's via soap to a secure server and get a response back and then import the response into a database. I have the connection to the secure server figured out and importing the returned xml figured out. I followed examples however I get nothing back in the service windows from the remote web site.
Here is my vb.net code with the soap request inside: Imports System.Net Imports System.Security.Cryptography.X509Certificates Imports System.IO Imports System Imports System.Text Imports System.Data [Code] .....