Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Raenius

    IRC Bot problems...

    Hi all, I've just started writing the most basic bot ever, namely the hello_bot :) Basically it is supposed to log into a channel and greet it... This is the source code I have: use Net::IRC; $irc = new Net::IRC; $conn = $irc->newconn( Nick => 'DCPTestBot', Server =>...
  2. Raenius

    Getting data from 5 minutes ago using DATEDIFF?

    LOL Just before you posted this I found the answer myself.. Anyway thanks for the answer and your time! - Raenius ps. Next time I'll do more research for opening a post. Oh well maybe someone else will benefit from this thread ;-) "Free will...is an illusion"
  3. Raenius

    Getting data from 5 minutes ago using DATEDIFF?

    Hi all, Currently I am working on a SQL query which I can't seem to get working properly. I want to gather distinct data from a table with a timestamp of 5 minutes before localtime. I've gotten so far: SELECT DISTINCT ROUTERS.name AS Router_Name FROM ROUTERS INNER JOIN...
  4. Raenius

    Threading and timer stop / start?

    Hi, In regards to Obislavu's first answer: "Another solution is to use another timer which will watch the PingThread termination by querying the ThreadState of the PingThread object. If the ThreadState was Running and now is Stopped that means the PingThread finished and you can take create...
  5. Raenius

    Best place to store my database connection string in C#?

    Can't you make a global class where you define your global variables like: using System; namespace YourNameSpace { public class Globals { // SQLConnectionString public static string SqlConnectionString = ""; } } Then you can call this Global using: Globals.SqlConnectionString; -...
  6. Raenius

    Threading and timer stop / start?

    If the main program would remain waiting until the thread finishes thus nullifying the idea of threading right? If I were to implement a second timer which would check for the PingThread to be finished for like every 10 ms wouldn't that cause a performance problem? The PingThread is handlike...
  7. Raenius

    Threading and timer stop / start?

    Hi all, I'm stuck with my application with regards to starting and stopping a timer based on whether a thread is finished or not. In my main program there is a timer and when it is triggered it: - stops the timer - spawns a thread which goes about pinging IP addresses and updating a database...
  8. Raenius

    Ping Utility freezing up...?

    I think I have localised the error to indeed the: serverHE = Dns.GetHostByName(host); and after that the: [code] IPEndPoint ipepServer = new IPEndPoint(serverHE.AddressList[0], 0); EndPoint epServer = (ipepServer); Weird thing is that it does not give any exceptions! :'( I hope that someone...
  9. Raenius

    Seeking sample code: (1) enumerating windows (2) reflection

    Hi, Here is some sample code for Reflection: /** * File: ReflectTypes.cs * Article: C# Reflection and Dynamic Method Invocation * Copyright (c) 2000, Gopalan Suresh Raj. All Rights Reserved. * Compile with: csc ReflectTypes * Run as: ReflectTypes <library> * eg., ReflectTypes...
  10. Raenius

    Ping Utility freezing up...?

    Hi all, I am working on incorporating the C# ping Utility from http://www.csharphelp.com/archives/archive6.html into my own winform program. I had to adjust some things (variables etc) for it to work but never mind that. I am currently calling the function with IP addresses I get out of my...
  11. Raenius

    Strange if statement behaviour...

    And indeed it was a trailing spaces issue, very weird because I thought that I had excluded this in my database updates...strange.. No worries everything is working fine now... up to my new part of the program which is Email validation with a regex in a textbox... Thanks for the help! -...
  12. Raenius

    Strange if statement behaviour...

    Equals method still gives the same result. Trimming the Padding I am now trying.. Basically what happens before this is that an query is made to a database and the string audio_en is declared via the sqldatareader.. &quot;Free will...is an illusion&quot;
  13. Raenius

    DataGrid Appearance

    I am still having problems with the resizing of the column width according to the size of the largest field. On my winform_load the datagrid is initialised and displayed using the following code: try { SqlDataAdapter da = new SqlDataAdapter("SELECT name AS Router_Name FROM ROUTERS"...
  14. Raenius

    Strange if statement behaviour...

    Hi all, On the load of a windows form I run some quesries against a database and extract some fields. For example if a certain settings is to be enabeled or not. If you look at the following code: // Audio Tab Page settings string msg2 ="Audio_enabled: " +audio_en...
  15. Raenius

    Problems with getting data from Database

    Thanks a lot, dang what a simple solution. Thanks again. - Raenius &quot;Free will...is an illusion&quot;
  16. Raenius

    Problems with getting data from Database

    Strange thing, I got a different error this time. This is my similar code: [code] SqlCommand SelectCommand= new SqlCommand("SELECT MAX(routerID) FROM ROUTERS", myConnection); SqlDataReader reader = null; reader = SelectCommand.ExecuteReader()...
  17. Raenius

    DataGrid Appearance

    Nevermind the last question it all worked out in the end, I've started using parameterised queries which work pretty well and maybe even some performance gain.. Now I'm stuck at a insert of multiple fields into multiple tables with one primary key (which is autogenerated) which needs to be...
  18. Raenius

    Problem with adding a relationship SQL Server

    All tables are empty, I've made sure of that. Any other things? &quot;Free will...is an illusion&quot;
  19. Raenius

    Problem with adding a relationship SQL Server

    HI, When I try to create a relationship between to tables in my database it gives the following error: 'ROUTERS' table saved successfully 'PINGS' table - Unable to create relationship 'FK_PINGS_ROUTERS'. ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]ALTER TABLE statement...
  20. Raenius

    DataGrid Appearance

    I've given up on the delete button inside the Grid. I just have circumvented it by adding a single delete button on the form and deleting the currently selected row by implementing the following: private void RemoveRouterDelete_button_Click(object sender, System.EventArgs e) {...

Part and Inventory Search

Back
Top