reading from two input tables and writing to a third in asp.net using C#
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: reading from two input tables and writing to a third in asp.net using C#

Hybrid View

  1. #1
    Join Date
    Mar 2013
    Posts
    1

    reading from two input tables and writing to a third in asp.net using C#

    I have two tables that I will search for a user login email adress if its not in the first table, I will checvk the second table, if its not there I would provide an error message. do I need a connection string in web.config for each table?, what is the most efficent way to approach this....Thanks in advanmce

  2. #2
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: reading from two input tables and writing to a third in asp.net using C#

    If the two tables are both in the same DB then no.. you dont need two connection strings...

    you just have to check each table for the login..

    PSUDO CODE:
    Code:
     SQLQuery= "select * from table1 where user = " & username 
    
    If SQLQuery.count = 0 then   
        SQLQuery2= "select * from table2 where user = " & username 
        If SQLQuery2.count = 0 then
             MSGBOX "No such user"
        ELSE
            'Check user cred from table 2
        END IF
    ELSE
        'Check user cred from table 1
    END IF
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  3. #3
    Join Date
    Mar 2013
    Posts
    2

    Re: reading from two input tables and writing to a third in asp.net using C#

    In order to create a new line into the text file, you can use System.Environment.NewLine or "\r\n", to place a tab space you can use "\t". Reading data from text file and showing on the web page, will not automatically convert \r\n to new line, you will have to replace these characters with the <br /> as shown below.

    litText.Text = contents.Replace("\r\n", "<br />");

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center