-
March 4th, 2013, 01:39 PM
#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
-
March 5th, 2013, 03:19 AM
#2
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.
-
March 8th, 2013, 12:02 AM
#3
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|