Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8059027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:32:17+00:00 2026-06-05T09:32:17+00:00

I input username & i wanted to get all details as output.First i show

  • 0

I input username & i wanted to get all details as output.First i show you in php code,

$strSQLUSER="SELECT * FROM User WHERE username='".addslashes($MessageArray[0])."' AND state!='1' AND state!='4'";

$result_user=odbc_exec($conn,$strSQLUSER) or die("Could not connect to database");


$huntername   = stripslashes(odbc_result($result_user,"name"));
$huntlicense = stripslashes(odbc_result($result_user,"license"));

Then i use my .net coding for that.here is the part of the coding.

 private void MooseSeenInput(string MobileNo, string Date, string odd, params Array[] msg_arr)
    {

        controller = new UnitsController();

        DataSet ds = controller.GetUserDetails(username);
        if (ds.Tables[0].Rows.Count > 0)
        {
            //get username & License
            string user=ds.Tables[0].Rows[0]["name"].ToString();
            string license= ds.Tables[0].Rows[0]["license"].ToString();
        }

Then i wrote Stored Procedure for this… but i’m unfit for this procedure,

ALTER PROCEDURE dbo.

 @UserName varchar(50),
 @License  varchar(50) OUTPUT
 AS
 BEGIN

 Select * FROM
 Users
Where UserName = @UserName & State ='1' & State= '4'

END

–exec GetSMSUserDetails_SP

Additionally here i have added sqldataprovider part

 public override DataSet GetSMSUserDetails(string UserName)
    {
        return SqlHelper.ExecuteDataset(ViltraConnectionString, GetFullyQualifiedName("GetSMSUserDetails_SP"),UserName);
    }
     #endregion SMS
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T09:32:20+00:00Added an answer on June 5, 2026 at 9:32 am

    Use And instead of & for string concat in sql server.

    Remove Out Parameter from SP because you are returning records.

    ALTER PROCEDURE dbo.GetSMSUserDetails_SP
    
     @UserName varchar(50)
     AS
     BEGIN
    
         Select * FROM
         Users
        Where UserName = @UserName and State Not IN ('1' ,'4')
    
    END
    

    SP with Output param.

       ALTER PROCEDURE dbo.Getsmsuserdetails_sp @UserName varchar(50), 
                                             @License  varchar(50) output,
                                             @name  varchar(50) output
    AS 
      BEGIN 
          SELECT TOP 1 @License = License, @name = name 
          FROM   Users 
          WHERE  UserName = @UserName 
                 AND State NOT IN ( '1', '4' ) 
      END 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the code in my view: echo $this->Form->create('Chart'); echo $this->Form->input('username', array('label'=>('Usernames List'), 'empty'=>('Select
Ok, I have this code that asks an input for a username and a
this is my HTML: <?php echo form_open(base_url().'admin'); ?> <div class=row username> <span class=icon></span> <input
what is the best approach to using javascript to asking input username & password
I am using a PHP login script that challenges user for username & password.
I have following code in JavaScript function checkEntries() { if(document.getElementById(username)== && document.getElementById(password).value==) { alert(Please
My html form is: <div id=account-box> <form method=post> <label for=username>Username:&nbsp;<span class=input-bg><input class=login-input name=loginUser type=text
The PHP file: <? print_r($_REQUEST); $thispage = 'login'; require('db.php'); if($_POST['admin_username'] && $_POST['admin_password']) { $query=SELECT
Hi I have a textbox that takes a username input. When the user submits
How to rewrite Webconfig connection string at runtime.I have input textbox for Server,UserName and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.