Results 1 to 4 of 4

Thread: SQL / C# Question! *Resolved*

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Posts
    100

    SQL / C# Question! *Resolved*

    Hello,

    This is a snippet from my code, I do this several times! I was just wondering if anyone had a suggestion for a simpler way to do the following:


    Code:
         case "address_map":
    		RS = DB.Execute(myData.pService.SQL_ADDRESS_MAP_CHECK.Replace("%1", A[1]), out ob, -1);
    		if (!RS.EOF)
    		{
    			Out_Data += "error ";
    		}
    		else
    		{
    			DB.Execute("insert into address_maps (Mail_Box_ID, Email, Status, Misc) Values('" + A[2] + "','" + A[3] + "','" + A[4] + "','" + A[5] + "')", out ob, -1);
    			Out_Data += "good ";
    		}
    		Send(Out_Data + Environment.NewLine);
    		break;
    
    	case "domain":
    		RS = DB.Execute("select domains.Domain_ID, domains.Domain, domains.Post_Office_ID, domains.Status, domains.Misc from domains where domains.Domain = '" + A[2] + "'", out ob, -1);
    		if (!RS.EOF)
    		{
    			Out_Data += "error ";
    		}
    		else
    		{
    			DB.Execute(myData.pService.SQL_DOMAIN_CHECK.Replace("%1", A[2]).Replace("%2", A[3]).Replace("%3", A[4]).Replace("%4", A[5]), out ob, -1);
    			Out_Data += "good ";
    		}
    		Send(Out_Data + Environment.NewLine);
    		break;
    Thank YOU!!!
    Mitchel
    Last edited by toto; Jun 11th, 2003 at 06:49 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width