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 Wanet Telecoms Ltd 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: *

  • Users: Laeg
  • Content: Threads
  • Order by date
  1. Laeg

    Method overloading question

    If I have 2 methods of the same name, each taking one parameter. The first takes the parameter by value and the second by reference. When invoking the method how do I specify which version I want to use? Given public class foobar{ ... public foo(int a){} public foo(ref int a){} } how do I...
  2. Laeg

    ValueTypes

    The concept of ValueType vs Reference Type is understood along with the relation to Stack vs Heap but I have a question int - a value type, stored on the Stack int - inherits from System.ValueType which in turn is derived from System.Object So why is int not considered an object and placed on...
  3. Laeg

    Aggregate Query product -> Table LookUp

    SELECT CONVERT(BIGINT, (1000000000+9999999999)*RAND()) as NewPIN WHERE NewPIN NOT IN (SELECT PIN FROM CustomerPins) Invalid column name 'NewPIN' How can I take the product of this aggregate query and then use it to do a lookup on another table?
  4. Laeg

    NULL issue

    I have 2 controls inside a form <asp:DropDownList id="MyDDL" runat="server" OnSelectedIndexChanged="DoStuff()"> and <asp:treeview id="MyTree" runat="server" /> So changing my dropdownlist value OR click on a node in my tree can submit my form. I have a line in my Page_Load() that accesses...
  5. Laeg

    Simple Regex Help

    I'm trying to capture the following 'The digit 0 followed by 1-3 occurences of any digit and then a hyphen character followed by 5-7 occurences of any digit So like 025-23456, 057-3456789, 086-458953 etc Dim MyRegEx As New Regex("/^0\[0-9]{1,3}-\[0-9]{5,7}/") Does not seem to be...
  6. Laeg

    SQL to LINQ translation help!

    I have a table of CartItems, with the ProductID bought and then an Extra field which is true or false. I want to see a grouping of a count of each ProductID but within that count I want to know the count of ProductIDs with extras. create table test(CartItemID int, ProductID int, Extra int)...
  7. Laeg

    Can this be done?

    I have a table of CartItems, with the ProductID bought and then an Extra field which is true or false. I want to see a grouping of a count of each ProductID but within that count I want to know the count of ProductIDs with extras. So given create table test(CartItemID int, ProductID int...
  8. Laeg

    Countdown Timer

    I need a countdown timer from 3 minutes to that has 2 events. 1] When timer reaches 0, Event1 fired "Time Up" message 2] A specific user action, Event 2 fired, timer reset to 3 minutes. The problem I have is how to display the clock to the user but yet have the application retain control. I...
  9. Laeg

    &quot;Application level object&quot;

    Is it possible to have an object available to all pages in a given solution? For example if I wanted to store a Database Object and make it available to all pages in my solution but the datasource of that object depended on a selection made by the user, how would I achieve that without passing...
  10. Laeg

    Regular Expression problem

    Dim rx As New Regex("/^0\d{1,3)-\d{5,7}/") If(Not(rx.IsMatch("01-12345")))Then ' Why is this executed? End if Can anyone tell me why the pattern above does not match the string?
  11. Laeg

    Regular Expression help

    Can I get some help with a regular expression? I'm trying to express the following for a string Up to 4 digits, but the first digit must be a 0 followed by a hyphen followed by up to 7 digits. So the following are examples of valid strings 02-456 0546-456789 Thanks
  12. Laeg

    XMLTextWriter

    When finishing off writing an XML file with XMLTextWriter at the point where you use WriteEndDocument, how can I add a vbCrLf to the end of this document? As in XMLTextWriter writes <a> <b></b> </a> <----- I want to add a carriage return after this line but using XMLTextWriter's...
  13. Laeg

    class td border

    I want to have 2 types of table styling - A coloured table border on the outside of the table only - A coloured table border outside and also on tds So basically a square box vs a grid, this works in FF but not in IE, can anyone help me colour the tds in the grid in IE? <!DOCTYPE html...
  14. Laeg

    Most flexible way to bind data to a datagrid

    Usually I just bind a dataset to a datagrid but this time I want to have a great deal of flexibility as depending on some conditions each row that I display will look different. So I want to be able to loop through a datasets' results and output a row dynamically rather than just binding all...
  15. Laeg

    One for the MySQL Gurus!

    I have a lot of SQL INSERT statements that have been generated dynamically in code. I want to pass this string of generated queries to a stored procedure to run them, BUT within a transaction. Can this be done?? So something like -- Create the table CREATE TABLE tblA(a int auto_increment...
  16. Laeg

    multiple sql statements in a prepare?

    I have some sql statements that I am preparing in code which I pass to a stored procedure to execute via the prepare statement but I keep getting an error, how can I get around this? create table tblA(a int auto_increment primary key, b int) CREATE PROCEDURE `foobar`(IN sSQL varchar(1000))...
  17. Laeg

    Reverse IN query

    Table definition tblFoo x varchar tblFoo ------ x ------ abc def ghi I have a string like 'abc,def,ghi,jkl' and I want to say return for me everything in this string that is not in tblFoo. So basically the reverse of: SELECT * FROM tblFOO WHERE x NOT IN ('abc,def,ghi,jkl'); Ultimately I...
  18. Laeg

    Exception Catching Oddness

    I have some code that goes Dim DRDataTable As DataTable Try FunctionThatReturnsADataset(MyDataSet) DRDataTable = MyDataSet.Tables(0) ' Processing ... Catch ex As MyCustomException End Try Public Class MyCustomException Inherits System.Exception Public Sub New(ByVal Message...
  19. Laeg

    Catching Exceptions

    How do I find the complete execution path of the following code structure? Class MyClass DBConnect() Function DBConnect() Try MyDatabase.Connect() Catch ex as MyCustomException SendErrorEmail(MyDatabase.DBError()) End Try End Function Function SendErrorEmail(ByVal AppException as...
  20. Laeg

    Stored Procedure

    I want to add a record to tblA and insert the identity field generated into tblB. If there are 2 successful INSERTs then I'd like a true/false boolean returned. How do I do this in mysql with a stored procedure, in/out parameters and transactions? tblA A int auto_increment primary key NOT NULL...

Part and Inventory Search

Back
Top