Time - Using .NET To Query NTP Servers?

Jan 15, 2012

As the title describes I am looking for a way to query for the UTC time from NTP/SNTP Servers from 'VB.NET'The only libraries I have found for VB.NET to such tasks appear require a fairly large sum of different forms of currency.

View 1 Replies


ADVERTISEMENT

Pull Time From Time Servers

Jun 21, 2010

My requirement is to pull time from TIME SERVERS through .NET code to avoid time manipulation in my project which needs to record time for users when they start particular task and system clock can be changed to record wrong timings. I need to pull this time in IST.

I was able to get some links but unable to write codeThe links are: NIST Internet time service ftp://time-a.nist.gov/pub/daytime/ NIST Internet Time Service clock Current local time in India

One of the above link has source code of windows utility in C# which I am not familiar with. We can just get the code from the utility that just queries the server and then use the time. We have to make the application to randomly choose a server from a list of servers if you have query lots of times as they deny requests if queried multiple times in a period.

[code...]

View 2 Replies

Deleting A File Or Folder On Multiple Servers From A List Of Servers?

Sep 29, 2011

I don't really know how to code but am pretty good at tweaking. I'm trying to set up a script that I can run to delete a single file, multiple files, a folder or multiple folders on a list of servers.I was thinking that the script could read the files to be deleted from a .txt file and apply the deletion to a list of servers in another .txt file.Example:

FilesToBeDeleted.txt:
\(insert_server_name_from_list)c$Program FilesBINexample_file.rpt
or

[code].....

View 1 Replies

LINQ Query Is Enumerated - Turn On Some Kind Of Flag That Alerts Me Each Time A LINQ Query Is Enumerated?

Sep 22, 2009

I know that LINQ queries are deferred and only executed when the query is enumerated, but I'm having trouble figuring out exactly when that happens.Certainly in a For Each loop, the query would be enumerated.What's the rule of thumb to follow? I don't want to accidentally enumerate over my query twice if it's a huge result.

For example, does System.Linq.Enumerable.First enumerate over the whole query? I ask for performance reasons. I want to pass a LINQ result set to an ASP.NET MVC view, and I also want to pass the First element separately. Enumerating over the results twice would be painful.It would be great to turn on some kind of flag that alerts me each time a LINQ query is enumerated. That way I could catch scenarios when I accidentally enumerate twice.

View 3 Replies

SQL Query Time Out?

May 3, 2010

I had one problem when query in VB.net. It fails at first time after SQL server restart, the fail message is "timeout expired". The same query success in second time onward, How can I set timeout in VB dataSet property? I use DataSet to communicate with database. Below is the query statement I used in FillBy() function.

[Code]..

View 2 Replies

Query To Just INSERT A Whole Record At A Time

May 8, 2009

No Update to DB?? ***?

[code]

And why isn't there a query to just INSERT a whole record at a time, based on a DataSource, or is that a better kept secret than what REALLY happened during the final hours of the Titanic?

Also, I'm under the impression that the default CommandType is Text.

View 39 Replies

SQL Query : What If Two Queries Were Executed At The Same Time

Jun 18, 2012

Sample Table
Job_ID Job_Name Status
1 TEST00001 FOR KE
2 TEST00002 FOR KE

[code]....

I have sql query that will get a jobname where status is equal to 'FOR KE' and I have multiple users that will query that.Now, what if two queries was executed at the same time? Will the two users get the same jobname? How can I avoid that?

View 15 Replies

Update/Select Query At The Same Time?

Mar 21, 2011

I have this query which I want to submit after the user click a button.

Update tbl_books Set Bk_Rent = Bk_Rent - 1 Bk_Avl = Bk_Avl + 1 Where Bk_Id = ( Select * from tbl_transactions where Trans_Id = @a )

The problem is as far as I know, Update and Select queries have different formats. Update statements will use the ExecuteNonQuery()while Select needs a dataset. My problem is how can I execute these two statements at the same time. I tried this code but it didn't work out.

Dim command4 As New OleDb.OleDbCommand
Dim adapter4 As New OleDb.OleDbDataAdapter
Dim dataset As New DataSet

[Code].....

View 9 Replies

Date Time Picker And Parameter In Query Builder?

Aug 19, 2010

I have a datatimepicker1 on the form and want to display the result dataset in the datagrid view.So I use query builder in the dataset designer to put "@PickDate" in the filter of PickupDate.And i use the following code to get the result and show in datagrid.But it is not working.Actually I don't know what syntax to use for the date parameter.

Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged
Me.HisPickupTableAdapter.FillByDate(Me.HisPickUpDataSet.HisPickup, Me.DateTimePicker1.Value.Date)
End Sub

View 1 Replies

VB Dynamic Run-Time Query With Linq And Lambda Expressions

Mar 16, 2009

I have an untyped dataset returned from my WebService. The user wants to dynamically construct a query referencing tables and columns and specifying values to test for.I have looked at Lambda Expressions and the Expressions.Expression Namespace. I think these provide the answer I'm looking for, but I'm not certain how to go about contructing the linq expressions to extract the datarows I'm looking for.

I plan on limiting the result to one datatable that the query will result in and i"ll provide the joins from the user's constructs.For a simple example I have a DataTable with (n) rows called "Table", and in it there is a computed column called "b_IsActive" that has the expression "Convert(IsActive, 'System.Boolean')". The user wants to retrieve all rows in "Table" where field "b_IsActive" is true.

View 5 Replies

VS 2008 : SQL Query - Works At Design Time But Not Runtime?

Aug 16, 2010

I've created an SQL Query using the query builder. In the query builder, you can test the query by clicking the button "Execute Query", and entering the desired values in the parameter fields.

My query returns the correct results when I do this, but when I seemingly pass the same values at runtime, I get 0 records returned.The query is designed such that you can pass nulls if you don't wish to filter data by that particular parameter.
SQL Query:


SELECT ID, UPC, Quantity, Manufacturer, Style, Color, Size, Category, DateReceived, Cost, OriginalRetail, Retail, LocationID
FROM Inventory
WHERE (UPC = @UPC OR

[code]....

In the query builder "Execute Query" dialog, I enter a value I know that the db contains in the "Size" field, "1/1/1900" & "1/1/2199" in Dates A & B, respectively, and nulls for all other fields. This returns 1 record, which is just as I expected. It works correctly.But when I pass the same values into the method created by the designer, I get 0 records returned. I can't figure out where the problem lies. Even if I enter nulls for all fields other than the dates, it returns 0. This tells me that the dates are causing the problem, but I can't figure out why, because I'm passing strings equivalent to what I entered in the query builder.

View 6 Replies

Sql Server - Convert A Date And Time Into A MS SQL Select Query Using SelectParameters

May 29, 2009

I have this situation where I have a SqlDatasource control and the select query is like:

SELECT col1, col2 FROM table1 WHERE colDate = @date

The source of @date is a label with the text: 2009-05-29 12:06:00 I get the following error when I run the query:

Conversion failed when converting date and/or time from character string

I tried using convert(datetime, @date), as well as different date/time formatting of the label itself. Everytime I get the error.

However, when I run the query in the management studio like:

SELECT col1, col2 FROM table1 WHERE colDate = '2009-05-29 12:06:00'

I found out that the @date is parsed as 05-29-2009 01:30:00 TT I don't know where the TT is coming from? And I'm sure SQL Server wouldn't be able to handle it?

View 3 Replies

C# - Get CheckIn-CheckOut Time Difference From Punch Machine Attendance Log With Single Row Using SQL Query?

Oct 10, 2011

we are using Punch Machine for Attendance with zkemkeeper.dll and geting AttLog using Vs.net 2010.How can Get Records from SQL Query? my table structure like this

LogID int P.K.
DeviceIP varchar
EnrollNo int

[Code]....

View 3 Replies

DropDown List SelectedIndex - Modifying The Inline SQL Query To Display By Date/time Added?

Sep 9, 2009

In a VB.Net application, how can I either: Find the dropDownList selectedIndex position of something just added to a database.Have a form restart with the most recently-added entry showing in the DropDownList, by way of modifying the inline SQL query to display by date/time added

View 3 Replies

Get All Possible Servers On A LAN Network?

Aug 30, 2011

I'm using the details on connecting to a server from a client here: [URL]

It's quite out dated but I just need it for a quick project. I need the client to auto-connect. This program will be running on the LAN only, is there a way to find on what computer the server is running on (i.e. all computers hosting the specific server on port x). I've seen it on a couple of games that run on LAN. Without access to the internet, they manage to display all available games on the local LAN. I'm doing this with VB.net.

View 1 Replies

Get The Disk I/O On Various Servers?

May 22, 2012

I am using the following code to get the Disk I/O on various servers. For now I am just retrieving the DiskReadsPerSec to get a feel for it. The return data gives a uint32 for each drive on the server and a total. My questions is what is the time frame that this represents? Is this at the second that my code polls the drive or is this over the last few seconds or do I need to do multiple runs to get an average.

My intention is to build a graph for each drive so I wonder how often I need to poll the drive to get a acurate value.

Public Shared Function GetDriveIO(ByVal strip As String) As Boolean
Dim oConn As New ConnectionOptions()
Dim lnglist As New List(Of Long)

[Code]....

View 1 Replies

Connecting To 10 Mysql Servers

Nov 15, 2010

i am trying to connect to 10 mysql servers and get aprox. 5000 rows. If i make the test from local network it works but if i take the test using mysql servers (same version) from different city it shows me the error "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding".[code]

View 1 Replies

App That Basically Gets Paths To Servers

Oct 12, 2007

I designed an app that basically gets paths to servers I have admin rights to, I am doing such things such as checking available space on the servers etc., the problem I am having is my app only works if I manually login via something like (start, run, \server) and supply my admin username and password just to store that authentication.How do I code this so it prompts the user in my program ONE time for all 5 servers (they all use the same username and password)

View 5 Replies

Click Once With Terminal Servers

May 27, 2010

Can ClickOnce software be ran on a terminal server?

View 3 Replies

Get All Servers From AD And Ping Check?

Feb 1, 2012

A little background, the client that I am working with has an enterprise AD that is a mess. They have no containers for servers or any organization what-so-ever. They also shutdown servers and did not remove them properly from AD. So I needed to come up with a program that would find all the windows server, identify them by OS, and then check to see if they would actually respond to a ping. (I am aware that this is not a perfect method if they are refusing ICMP's but its good enough for my purposes). The completion of the program will display all the information and then allow the user to save the excel workbook in a location that they choose.

vb.net
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

[code]......

View 4 Replies

Get The List Of All Sql Servers On Machine

Apr 12, 2012

how can i get the list of all sql servers on my machine i am trying this code i have vs 2010 and sqlexpress 2008 r2 i put breakpoints seems everything working fine but its not getting any server i don't know whats wrong with it here is the code on button click this suppose to work to get all servers and list them in the combobox cmbServer [Code]

View 5 Replies

Transfer File Between Two Servers?

Mar 11, 2010

How I can send file from server to another server in network??

View 2 Replies

Transferring Data Between Two SQL Servers Using VB?

Jun 12, 2011

The title of this thread perhaps does not explain my problem correctly.Actually i am developing a financial software for a company.The software is similar to a banking system. The software is being developed using VB 2008 and SQL Server 2008.The company has its branches located at different locations. They are having a centralized SQL Server at their Head Office.The branches are connected to Head Office using a VPN.Now what we are worried about is when the VPN gets disconnected.For that we will be having a SQL server installed at each of the branches.When VPN is connected the the details entered will be directly at the Head Office database,Meanwhile a program will be executed which will get details from the Head Office database at each of the branches in a XML file.When a branch gets disconnected from the VPN another program will get the XML details into the Sql Server installed at the branch. When the branch is connected again Another application will create a xml file from the local server and insert its details into the HO server.The sizes of the XML are reaching upto around 150 to 200 mb. I am using Dataset.WriteXML and Dataset.ReadXMl. I have tested this on my local machine it is taking upto 30-40 secs.I dont know how much it will take when the actual application is installed. How can i speed things up ? Does anyone have any idea on how i can do the whole process more smoothly and faster?

View 5 Replies

Use The WTSEnumerateServers API To Get A List Of Servers?

Apr 7, 2011

show me how to use the WTSEnumerateServers API to get a list of servers?

Here is the MSDN page: [URL]

...but I can't figure out the last 2 parameters:

ppServerInfo - Points to an array of WTS_SERVER_INFO structures, which contains the returned results of the enumeration.

pCount - Pointer to a variable that receives the number of WTS_SERVER_INFO structures returned in the ppServerInfo buffer.

View 1 Replies

Web Services And Proxy Servers?

Feb 16, 2010

I have the following code which connects to my webservice online:

Dim c As New com.*********.checkLicense()
c.CookieContainer = New System.Net.CookieContainer()
c.setApplicationGuid("e3b59b3d-4150-4cb0-adda-f5db004f362f")

[code]....

Now what I need to know is, if a user has proxy settings configured in IE, will this code automatically use the proxy?Also what happens when said proxy needs authentication?Anyone know how this can be adapted. I know about the System.Net.WebProxy class, however I would really need this to pick up the settings from IE by default and then if required (and only if required) pop up for proxy authentication.

View 1 Replies

Sql - When Run The Query In Query Analyzer, It Returns One Row But When Use The Same Query, No Rows Are Returned?

Aug 19, 2010

Here is the code:

Function getData(ByVal id As String)
Dim reader As SqlClient.SqlDataReader
Dim statement As String

[code].....

View 1 Replies

Check Multiple Services On Different Servers

Jul 10, 2011

Im trying to check multiple services on different servers. The idea is that every time a client clicks on a checkbox for the specific server and press the "check service" button it will check the status on the service and if it's not running it will restart the service and so on for the rest of the servers.[code]

View 2 Replies

Copy Folders Between Two File Servers

Jan 6, 2012

I was assigned a project to create a program of cloning two file servers. It will copy all folders (about 500, one day one folder, there are about 200 files in each day) from one file server (S1) to another file server (S2). If any error occurred while in processing, program will send an email to someone.

View 5 Replies

Create RDP Session On Remote Servers

Mar 31, 2010

I am trying to find the way to create RDP session on remote computer using VB and net framework.

Because my company is using RDP(not a console session), some processes that have window that is to show logs and event must be executed on the screen.

However there is a lot of computers, I have to find some solution that is to execute remotely.

The problems that I encounter are as below.

1. if there is no session(in case of restarted) - I have to create session.

2. if there is session - I have to get appropriate sessionID

3. Remote execution - to execute remotely on the session.

View 1 Replies

DatadGrid - Merging Two DataSets From Different Servers

Sep 22, 2009

I am trying to merge 2 datasets from 2 different servers, SQl 2005. I need to take 2 fields from one table and five from another to create one merged dataset and bind it to a datagrid, in an 2008 ASP.net application. The first table I will be saving to is empty just the table schema is there, The second table that the datagrid is populated by, has two columns containing dropdown box and a text field for user to edit these fields, these will be saved into the first table along with the user information, and a time stamp, but when a user pulls this information again the changes in the datagrid will reflect these changes.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved