.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

input parameter to MySQL

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :ASP.Net

Dear All,

I have below code that I want to make a input parameter into the SQL ?, it can be where clause or empty string. But it prompt exception???

select * from a inner join
(select * from b ? ) c on a.aclink=c.aclink

Dataset.DS_CategoryReport.DT_CatItemsDataTable rDT = this.GetData(dateClause);


public virtual DS_CategoryReport.DT_CatItemsDataTable GetData(string Parameter1) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((Parameter1 == null)) {
                this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value;
            else {
                this.Adapter.SelectCommand.Parameters[0].Value = ((string)(Parameter1));

View Complete Post

More Related Resource Links

SP Datetime parameter requires time input

I'm working on a Crystal report that contains 4 subreports.  Each subreport passes 2 date parameters to a stored procedure.  This works, but only if a value for time is also entered in the Crystal parameter prompt. How can I fix the stored procedure so these parameters will accept only a date as input?

passing parameter using ODBC - mysql

Dear All, I'm having problem on passing parameter on odbc because it's not working at all.  I tried this using sql and I have no problem at all. All are working fine.  Is there a different syntax on odbc?  Here's my code: Private Sub BindDetails() ' Obtain the index of the selected row Dim selectedRowIndex As Integer = GridEmployee.SelectedIndex ' Read the employee ID Dim IDNumber As Integer = GridEmployee.DataKeys(selectedRowIndex).Value ' Define data objects Dim conn As OdbcConnection Dim comm As OdbcCommand Dim reader As OdbcDataReader Dim connectionString As String = _ ConfigurationManager.ConnectionStrings( _ "mysqlconn").ConnectionString ' Initialize connection conn = New OdbcConnection(connectionString) ' Create command comm = New OdbcCommand("SELECT employee.IDNumber, employee.EmployeeID, project.ProjectName, team.TeamName, employee.Username, employee.`Password`, employee.LastName, employee.FirstName, employee.MiddleName, employee.NickName, employee.EmailAddress, employee.DateHired, employee.LengthService, employee.RegularizationDate, employeestatus.EmployeeStatusName, employee.Birthdate, employee.Mobile1, employee.Mobile2, employee.Phone1, employee.Address, employee.Colleg

How to get input parameter's count and type by using MetadataImporter

I want to get each input parameter type of all operations in WCF Service via MetadataImporter, the code as below: Service Contract: it is default after you created a wcf applicaiton in vs 2010     [ServiceContract]     public interface IService1     {         [OperationContract]         string GetData(int value);         [OperationContract]         CompositeType GetDataUsingDataContract(CompositeType composite);         // TODO: Add your service operations here     }   Client Side:             string mexAddress = http://localhost:53720/Service1.svc?wsdl;                      BasicHttpBinding binding = new BasicHttpBinding();             MetadataExchangeClient MEXClient = new MetadataExchangeClient(binding);             MetadataSet metadata = MEXClient.GetMetadata(new Uri(mexAddress),  MetadataExchangeClientMode.HttpGet);          &nb

Input Parameter in Finder Method BDC Model

Hi Guys, I know it is possible to create a Finder method with an input parameter, but I am trying to figure out how to pass the parameter to the method. Here's my isssue:   I have created a BDC Model in VS2010, my finder needs to have an input parameter. This input parameter is available on a list that is already available on my site. What are my options to pass this parameter to my finder method and display the results?   My intention (not sure if it makes sense) is to create and action for the model of the list that is already available, so I can capture the variable and pass it in a query string to  a list that I create for the Finder method that requires an input parameter. The problem is I dont know how to do this or even if it the best way to go about solving the problem. Using a business data list and business data related list while possible is really not an option.   Thanks  

Exposing data contract without passing as input or output parameter for any operation contract


I have a method in  wcf which returns stream of custom object. I need to deserialize this stream at client side, but my custom class which is exposed as data contract is not visible through client proxy. When I add a dummy operation contract which returns the custome object I am able to get this custom class. I dont want to write this dummy method as there are many such custom classes.

Is there any way to expose data contract without writing any operation contract that returns or accepts data contract type object?





input parameter in ssrs



Does ssrs allows input parameter from text box? I don't want to chose it from combo box, I'll rather want to type a value. I need to type first 4 characters, and get all values. Something like this:


SELECT DISTINCT articleNo FROM tbl_articles

WHERE articleNo LIKE @InputArticleNo+'%'

ORDER BY articleNo


Exposing data contract without passing as input or output parameter for any operation contract


I have a method in  wcf which returns stream of custom object. I need to deserialize this stream at client side, but my custom class which is exposed as data contract is not visible through client proxy. When I add a dummy operation contract which returns the custome object I am able to get this custom class. I dont want to write this dummy method as there are many such custom classes.

Is there any way to expose data contract without writing any operation contract that returns or accepts data contract type object?

How to pass SQL server 2005 instance name as a input parameter to restoressp STSADM command


I am facing a problem with restoressp STSADM command. We are using a separate SQL server 2005 instance for our SharePoint PORTAL. For e.g. the instance name is MOSSSQL. I have restored the SSP database from production environment to development environment. But facing the problem when I associate the restored SSP database with new SSP using restoressp STSADM command.

As per Microsoft guideline I have used the restorespp command to attach the database with my new SSP. If I pass the sspdatabaseserver input parameter as “servername\SQL instance name” then its giving me the error message that “required argument are mission – sspdatabase”.

Below is the command

stsadm -o restoressp   
-title “My-SSP"
-url "http://mymoss:11111/"
-ssplogin "username"
-mysiteurl "http://mymoss/mysites/"
-indexserver "MYMOSS"
-indexlocation "e:\logs\"
-sspdatabaseserver "MYMOSS\MOSSSQL "
-sspdatabasename "MySSP1_SSP"
-ssppassword "password"
-searchdatabaseserver "MYMOSS\MOSSSQL"
-searchdatabasename "MySSP1_Search"
-ssl no

Note: I have system admin rights and I am the DB owner



Senthilrajan K

Read web method input parameter in UTF-8 encoding



I have a web service written in ASP.NET 2.0 using Visual Studio 2005. The web service contains a web method which takes in a string parameter:


[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
    public Service()

        //Uncomment the following line if using designed components 

    public string DoProcess(string input)
        // Do some processing...
        // ....           
        return result;


The web.config file contains the <globalization> tag.


This web method will be called by a third-party client, which will be sending data in UTF-8 encoding. But during development, I created my own test client to test the web method. The client passes in the Unicode characters in UTF-8 as input to the web service method.

I discovered that if the HTTP headers in

How to print a report one page per input parameter?


I am working on a new report, and have been asked to have a report that may have multiple part numbner, and they want the report to keep the report details seperate for each part number. How do I do this?

It seems like I would recursively be calling the report. I have not done this before. Any help is appreciated!

__________________ Clifton Dunaway

Display value based on particular input in Mysql-Asp.net


nI am working on work status project i have different columns..workNo(primary key),Name,startdate ,enddate,status(X,Y,Z) in database.I want view the status of the particular work with a single button click on to grid view when you give workno input from a textbox.how can i write the query for this, now i could display all records/history for particular workno on to grid view


Reporting Subscription - dynamic To depending on dynamic input parameter



SSRS : 2005

Deployed: A Simple RDL with a single input parameter(for simplicity say the parameter is City).

The requirement is to send the report to Mayor of each city.  I already have a table with following info.





> Report should run at a static schedule and send reports to each mayor with their City. Currently using regular subscriptions.. which means 50 subscriptions for fifty different cities.

Every time a new city comes, automatic subscription to the Mayor Email ID. Email should not be sent if the there is no data for the city on that particular day.



how to capture text from text field and pass to input parameter of dataconnection added as rules in


Hi All,

I have a small application on infopath form published to Sharepoint form library.

I have a text field where i enter serial number to search.

And on rules of search button i added rule where i pass input text to input parameter of dataconnection.

This dataconnection is actually a web service which get details of serial number from SQL database

and then on another button "remove record" rule added where if data is there..which result from first button then delete record from form library and database and enter log details to SQL table ..these all steps writtern in try catch of a webservice.

My problem is:

1. when i enter text to search i need to click twice on search button to get data from SQL ..or i have to click on outside of text field (anywhere in form) to get the event changed and then to click to button to search.

2. when i click on "remove record" button i get error message as error in accessing datasource..

but when i check in preview its working fine


pls advise


-- Regards Sandeep

SOAP as input parameter in a web service method


I have a webservice method which needs to accept SOAP as input parameter. I've worked webservices between .NET clients but I've never worked using raw SOAP so I don't know what to do. The format of the input like this:

<?xml version="1.0" encoding="utf-8"?>
<S:Envelope xmlns:S = "http://schemas.xmlsoap.org/soap/envelope/">
    <ns2:RemoteService xmlns:ns2 = "some.ns.url">
        <param2>Asd Qwe</param2>
        <param3 xsi:nil = "true" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"/>
    </ns2:RemoteService >

How should my method input be to accept this SOAP as parameter?

I'm using ASP.NET web services not WCF.

How to assign 'Maximum Input Attribute' parameter for Decision Tree in SQL Sever 2005 in vba



I'm trying to assign the 'Maximum Input Attribute' parameter of the Decision Tree algorithm during forming a Mining Model in vba (see the code below). But I get an error message, that it is invalid for my Decision Tree. Is this parameter available only for bayesian networks or it appears only in version 2008 or am I doing something wrong?  Thank you very much in advance!

        TreeModel.AlgorithmParameters.Add("SPLIT_METHOD", intSplitMethod)
        TreeModel.AlgorithmParameters.Add("MAXIMUM_INPUT_ATTRIBUTE", 20)


Parameter '?/*IN' not found in the collection. (MySQL)


I'm sending parameters to a stored procedure in MySQL to do an insert and I'm getting an error that I don't understand:

Parameter '?/*IN' not found in the collection.  

Do you have any idea what this means?


Input parameter to a Stored Procedure External Content Types and External lists



I am displaing data in form of a External list that gets it data from an External Content Type that gets its data from a stored procedure. This works fine but what I really would like to do is to be able to send an inparameter with the user name down to the store proceder so it only return the rows marked with the users loginname.

Is this possible (out of the box)?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend