Can't Remember How To Pass Int Value To Datasource

Sep 22, 2007

I have know this error but have completely forgotten how to take care of it.  How do I pass the integer values to the SQL statement?

ERROR: Syntax error converting the nvarchar value 'Label' to a column of data type int.

WHERE (LinkInfo.L_State = @State) AND (LinkInfo.CG_ID > @CatIDLow) AND  (LinkInfo.CG_ID > @CatIDHigh)

<SelectParameters>
            <asp:ControlParameter ControlID="TextBox1" Name="State" PropertyName="Text" />
            <asp:ControlParameter ControlID="Label2" DefaultValue="0" Name="CatIDLow" PropertyName="Text" />
            <asp:ControlParameter ControlID="Label3" DefaultValue="1899" Name="CatIDHigh" PropertyName="Text" />
</SelectParameters>

CODE  BEHIND

public partial class TopandBottomSelect : System.Web.UI.Page
{
    int CG_IDlower;
    int CG_IDupper;
   
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (RadioButtonList1.SelectedIndex == 0)
        {
            CG_IDlower = 0;
            CG_IDupper = 1900;
            Label1.Text = Convert.ToString(CG_IDlower);
            Label2.Text = Convert.ToString(CG_IDupper);
        }
        else
        {
            CG_IDlower = 1899;
            CG_IDupper = 3000;
            Label1.Text = Convert.ToString(CG_IDlower);
            Label2.Text = Convert.ToString(CG_IDupper);
        }
        GridView1.DataBind();
    }
}

 

Thank you

View 3 Replies


ADVERTISEMENT

How To Pass In SOAP Header For XML Datasource

Apr 3, 2006

Hi,



I have created a simple webservice with a soap header and am trying to
access it using an xml datasource in reporting services. The query
works but I have no idea how to pass in a value for the UID on the host
header. Any help? what XML would I add for the header?



This is what I have no that allows me to pass in parameters through the editor.

<Query>

<Method Namespace="http://tempuri.org/" Name="HelloPerson2"/>

<SoapAction>http://tempuri.org/HelloPerson2</SoapAction>

</Query>



Here is the code for the webservice:

/// <summary>

/// Summary description for WebService

/// </summary>

[WebService(Namespace = "http://tempuri.org/")]

[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

public class WebService : System.Web.Services.WebService {



public WebService () {



//Uncomment the following line if using designed components

//InitializeComponent();

}



[Serializable]

public class PersonHeader : SoapHeader

{

private int _uid;

public int UID

{

get { return _uid; }

set { _uid = value; }

}

}



public PersonHeader userCredentials;



[WebMethod]

[SoapHeader("userCredentials")]

public Person HelloPerson2(string firsName, string lastName)

{

Person person = new Person();

//person.FirstName = "John";

//person.LastName = "Smith";

person.FirstName = firsName;

person.LastName = lastName;

person.UID = userCredentials.UID;

return person;

}



[Serializable]

public class Person

{

public Person()

{

}

private string _firstName;

public string FirstName

{

get { return _firstName; }

set { _firstName = value; }

}

private string _lastName;

public string LastName

{

get { return _lastName; }

set { _lastName = value; }

}

private int _uid=1000;

public int UID

{

get { return _uid; }

set { _uid = value; }

}

}

}

View 7 Replies View Related

How To Pass A Long Parameters To The Datasource?

Apr 5, 2007

I defined the following stored Procedure as the datasource



CREATE PROCEDURE p1(@cond String)
AS
BEGIN
SELECT Id,Name from table1 Where @cond
END



@cond is a long sql , for example



Id in (select sunId from table2 where .......)



my question is

how can I pass the parameters( @cond ) to RS2005?



thanks!





View 1 Replies View Related

Pass Datasource Name As Input Parameter

Feb 23, 2007

hi,

how to pass Datasource Name as input parameter from command propmt to rdl file in sql server 2005?

Thanks,

shanthi

View 3 Replies View Related

I Don't Remember How It Was...

Jun 1, 2006

Using this system function (::fn_dblog(null,null)) you find out how many transactions are been confirmed in your .LDF. Although by means of another system function you can see further information, i mean statistical ones.

Any help would be very appreciated.

View 1 Replies View Related

How To Remember Last Record Read

Jul 23, 2005

Hi,Can you guys see if there's a solution to this problem?I have a database from which I have to read each record and processthat record. New records are being added all the time, so I need to goback and check for new records and process them.However:-- there is no 'identity' column in the database design (so I cannotkeep track of the last record read by use of a numeric variable)-- I am not allowed to update the database (so I cannot flag therecords I have read).My problem is: how can I know which records I have already read andwhich ones I haven't read yet? I don't want to process records twiceand don't want to miss any records.Is there a known solution to this problem? Any ideas?Thanks.

View 12 Replies View Related

Installation - Can't Remember One Of The Things I Installed...

Feb 21, 2008

Hello,

A while ago I installed SQL CE on my decive. Unfortunately, it crapped out at one point so I'm reinstalling what needs to be put back on. I'm pretty sure I just used the CAB files to do this (but I might be mistaken). In any case, I remember there being an application that allowed me to do queries, browse data, etc. on my device's databases... I'm pretty sure it was just something included with SQL CE.

I already have the CF installed. I have all of the SQL CE CABs installed as well (I think)... but for some reason I simply cannot remember what CAB or other installation that would contain the browser, query creation thing, and so on...

Anyone have any idea what I'm rambling on about? Thanks!

View 1 Replies View Related

SQL 2012 :: Simple Way To Remember Primary And Foreign Key?

Dec 15, 2014

What is the simple way to remember Primary and foreign key?

Why is the ID column in a table declared as a integer datatype?

View 2 Replies View Related

SQL Server 2008 :: Creation Of Random Password Which Is Easy To Remember

Jun 2, 2015

I have written a script to GENERATE Random Password. But I want to modify that to a some kind of password which is little easy to remember!

I have seen some of the online sites where they generate passwords which are easy to remember and having some way to remember them,

my script:-
declare @db_pswd nvarchar(4000);
declare @len1 int = 16,
@min tinyint = 40,
@range tinyint = 74,
@exclude varchar(50) = '11cdtyuXR#0:;<=>?@O[]`^/abfty#$%^&1234567890*',
@output varchar(500)

[Code] .....

View 4 Replies View Related

Remember Expansions/drilling Level Between Subsequent Runs Of A Report.

Mar 9, 2007

Hi all,

I have a report in which the user can drill down on data. However when the user changes a parameter and reruns the report, all nodes are collapsed again. Is it possible to let the report keep the expansion state of nodes after pressing the 'view report' button again?

Regards,
Henk

View 1 Replies View Related

How To Pass Pass The Parameter In SQL Command In SSIS Package

Jul 31, 2006

Hi

   We already used Oracle Datasatage Server the following Query statement for Source and Lookup.here there is parameter maping in the SQl Statement . How can achive in SSIS the Folowing Querystatment?

 

Query 1: (source View Query)
SELECT
V_RDP_GOLD_PRICE.GDR_PRODUCT_ID, V_RDP_GOLD_PRICE.ASSET_TYPE, V_RDP_GOLD_PRICE.PREFERENCE_SEQ, V_RDP_GOLD_PRICE.RDP_PRICE_SOURCE, TO_CHAR(V_RDP_GOLD_PRICE.PRICE_DATE_TIME,'YYYY-MM-DD HH24:MI:SS'), TO_CHAR(V_RDP_GOLD_PRICE.REPORT_DATE,'YYYY-MM-DD HH24:MI:SS'), V_RDP_GOLD_PRICE.SOURCE_SYSTEM_ID
FROM
V_RDP_GOLD_PRICE V_RDP_GOLD_PRICE
WHERE
REPORT_DATE = (select max(report_date) from V_RDP_GOLD_PRICE where source_system_id = 'RM' )



 

Query 2: (look up )

 


SELECT
GDR_PRODUCT_ID,
TO_CHAR(MAX(PRICE_DATE_TIME),'YYYY-MM-DD HH24:MI:SS') ,
TO_CHAR(REPORT_DATE,'YYYY-MM-DD HH24:MI:SS')
FROM
V_RDP_GOLD_PRICE
where
GDR_PRODUCT_ID = :1 and
report_date = TO_DATE(:2,'YYYY-MM-DD HH24:MI:SS')  AND
PRICE_DATE_TIME BETWEEN TO_DATE(:2,'YYYY-MM-DD HH24:MI:SS') - 7) AND TO_DATE(:2,'YYYY-MM-DD HH24:MI:SS')
GROUP BY GDR_PRODUCT_ID, TO_CHAR(REPORT_DATE,'YYYY-MM-DD HH24:MI:SS')



 

please anyone give the sample control flow  and how to pass the parameter?

 

Thanks & regards

Jeyakumar.M

 

View 1 Replies View Related

Data Access :: How To Recover Forgotten Password When Remember Password Option Checked

Jul 24, 2015

I have connected to Database using my credentials by checking remember password option. After few days I forgot my password. How can I recover the password as SQL remember it. Is there any way to recover my password instead of resetting it.

View 3 Replies View Related

SQL 2012 :: Remember Definitions Of Clustered And Non Clustered Indexes?

Nov 24, 2014

What is the easiest way to remember the definitions of clustered and non clustered indexes.

View 9 Replies View Related

SSIS Package Does Not Remember Password (OLE DB Connection + ADO.Net Connection)

Mar 29, 2007

Both the OLE DB Connection and ADO.Net Connection in SSIS Package does not remember password.

Im connecting to a SQL Server 2000 box using its sa password as test.

The SSIS package runs fine when you first set up the connection in bids

The bottom line is that SSIS keeps forgetting the password I feed into
the two Connections that I'm using. I double-click a connection,
type the password in, check "Save my password" and hit "OK" but the
password disappears from there whenever I run the package or
double-click the connection again.



is there any known workaround for this issue as I would like to schedule my SSIS package using a SSIS Step in a SQL Server 2005 Agent job.



the only thing I found when googling this error was link below but the workaround described here is a little harsh

http://www.developersdex.com/sql/message.asp?p=1921&ID=%3C1146409399.447345.7470@j73g2000cwa.googlegroups.com%3E




thanks in advance

Dave



the box SSIS is running on is Windows 2003 Server Standard Edition latest service pack

SQL Server 2005 (no service packs )





View 14 Replies View Related

Remember My Password Is Forgetting Password

Mar 11, 2008

On the login prompt for Report Server, there is a checkbox option to "Remember my Password." I check this, login successfully... but when returning to the Report Server, I am again prompted for the password, although the user name is saved. No matter how many times I do this, the password will not save in IE7. I have tried this on 3 different computers with IE7. In IE 6, I do not even get the checkbox as an option, just the user name/password prompt. In Firefox, the password saves fine. Any ideas what would be causing this?

Thanks,

Brian

View 1 Replies View Related

SQL DataSource

Mar 28, 2007

I working on a form using an SQL DataSource. I am going to add a where clause. In that where clause a value from a label will be passed from the user.
How do I pass to the HTML Source the label value from the where clause. The value can change from user to user.
Sample below:
SELECT [KeyRolesID], [KeyRolesDesc] FROM [KeyRoles] WHERE ([JobCodeFamily] = @JobCodeFamily).
I want to replace the @JobCodeFamily which is currently coded with a value from the Sql DataSource in the design form with a label value entered by the user.

View 2 Replies View Related

Wcf For Xml Datasource

Aug 28, 2006

Hi, guys

I used an exported wcf service as a web service, try to use it as the reporting datasource,

[OperationContract]

DataSet GetTestReportData();

the app.config in the service host:

<configuration>

<appSettings>

<add key="BaseReportingAddress" value="http://localhost:8999/ReportHandlerService"/>

</appSettings>

<system.serviceModel>

<services>

<service name="Reporting_Handler.ReportHandlerService">

<endpoint address="http://localhost:8999/ReportHandlerService"

binding="basicHttpBinding"

behaviorConfiguration="ReportingServiceBehavior"

contract="Reporting_Handler.IReportingHandler"/>

</service>

</services>



<behaviors>

<behavior name="ReportingServiceBehavior">

<metadataPublishing

enableGetWsdl="true"

enableMetadataExchange="true"

enableHelpPage="false">

</metadataPublishing>

</behavior>

</behaviors>

I set the datasource type as xml and the connection string to http://localhost:8999/ReportHandlerService, the query string for dataset is

<Query>
<SoapAction>
http://tempuri.org/IReportingHandler/GetTestString
</SoapAction>
<Method Namespace="http://tempuri.org/IReportingHandler/"
Name="GetTestString">
</Method>
</Query>

but it doesn't work, I tried use a pure asp.net web service and it works. can anyone help me to set the connecting string for datasource and query for dataset when it using wcf as the web service? Thanks in advance.



bruce



View 2 Replies View Related

What Is A Datasource Used For?

Mar 18, 2008

Hi All,

I have a question about the datasource that we create on the Report Manager. What is it used for? In the below connection string which is given in the "Connection String" text box of a datasource link:

"Data Source=ProdServer;Initial Catalog=Northwind"

What is this datasource used for? Is it used only to use the ReportServer database or even our queries incorporated in the RDL files will be run against this datasource? I think the latter should not happen because while creating RDL files also, we provide a connection string to run the stored procedures against that datasource.

Please let me know about the same.

Thanks a lot and let me know if the question is not clear.

Manoj Deshpande.


View 11 Replies View Related

Sql Datasource Has Too Many Arguments

Sep 13, 2006

Can someone help me with this?  For the life of me, I cannot figure out why I recieve this error: Procedure or function usp_ContactInfo_Update has too many arguments specified.Here is my code: <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"SelectCommand="usp_ContactInfo_Select" SelectCommandType="StoredProcedure" UpdateCommand="usp_ContactInfo_Update"UpdateCommandType="StoredProcedure"><UpdateParameters><asp:Parameter Name="Division" Type="String" /><asp:Parameter Name="Address" Type="String" /><asp:Parameter Name="City" Type="String" /><asp:Parameter Name="State" Type="String" /><asp:Parameter Name="Zip" Type="String" /><asp:Parameter Name="Phone" Type="String" /><asp:Parameter Name="TollFree" Type="String" /><asp:Parameter Name="Fax" Type="String" /><asp:Parameter Name="Email" Type="String" /><asp:Parameter Name="Res" Type="Boolean" /><asp:Parameter Name="Res_Rec" Type="Boolean" /><asp:Parameter Name="Com" Type="Boolean" /><asp:Parameter Name="Com_Rec" Type="Boolean" /><asp:Parameter Name="Temp" Type="Boolean" /><asp:Parameter Name="Temp_Rec" Type="Boolean" /><asp:Parameter Name="Port" Type="Boolean" /><asp:Parameter Name="Land" Type="Boolean" /><asp:Parameter Name="Drop" Type="Boolean" /></UpdateParameters><SelectParameters><asp:ProfileParameter Name="DivID" PropertyName="Division" Type="String" /></SelectParameters></asp:SqlDataSource>Here is my Stored Proc:ALTER PROCEDURE dbo.usp_ContactInfo_Update @Division varchar(1),@Address varchar(50),@City varchar(50),@State varchar(2),@Zip varchar(10),@Phone varchar(20),@TollFree varchar(20),@Fax varchar(20),@Email varchar(50),@Res bit,@Res_Rec bit,@Com bit,@Com_Rec bit,@Temp bit,@Temp_Rec bit,@Port bit,@Land bit,@Drop bit/*(@parameter1 int = 5,@parameter2 datatype OUTPUT)*/AS/* SET NOCOUNT ON */ UPDATE tblDivisionSET Division = @Division, Address = @Address, City = @City, State = @State, Zip = @Zip, Phone = @Phone, TollFree = @TollFree, Fax = @Fax, Email = @Email,Residential = @Res, Residential_Recycling = @Res_Rec, Commercial = @Com, Commercial_Recycling = @Com_Rec, Temp = @Temp, Temp_Recycling = @Temp_Rec, Portable_Restrooms = @Port, Landscaping = @Land, Drop_Off_Center = @DropWHERE (Division = @Division) RETURNAny Help is greatly appreciated!

View 2 Replies View Related

Sql Datasource Not Updating

Mar 6, 2007

I have this web store that I have been creating.  When a customer goes to check out, he has to log in, then he is redirected to a page where he can view/add/or edit shipping and billing address.  I have based all the sql statements on the profile username, adding records and retrieving them works just fine.  When I go to change something in the info it uses an sql statement that updates based on "Where AccountUserName = @AccountUserName", I have @AccountUserName set to Profile("Username").  Keep in mind this works fine for adding new or bring up current records.  I even put in code in the updated event for the sql data source to post a msgbox telling me how many rows were affected, it says 1 even though I dont see any change in the data.   What am I doing wrong here, it's driving me nuts, its just a very simple update. 

View 2 Replies View Related

Help! C# - Forms - Datasource

Mar 14, 2007

My god.All I want to do is post the contents of a web form to a database sql express 2005 or access using C#.  Why can I find nothing for this very simple process online?Can you tell I am totally frustrated? So lets say i have a few text fields and I want to click submit and have that entered into a table.  I use C# for code behind.  So I can do basic C# programming and I can to webforms with visual web developer 2005 dragging and dropping for textboxs and a button to the aspx page. But then the mystery begins for me.  How the hell do I simple post that form data to the table.  I understand connection string basics.  I aslo can design and create tables. But tying this all together is becoming a problem.  I don't want to use gridview formview detailview or any of that canned UI stuff.  I also don't understand VB and when I see VB examples they only cloud my already cloud ASP.NET world. Please help by posting examples, and maybe some links or books to add to my newbish collection. Thanks,Frank 

View 3 Replies View Related

Get Value From Datasource In Codebehind

Apr 23, 2007

Lets say I have a Sqldatasource that uses the following SelectCommand="SELECT category,name FROM table". How do I get the value on category from my datasource in code behind if I know that my selectcommand always will return one row? Can I write something like datasource.items["category"].Value? Thanks for your help! 

View 1 Replies View Related

Most Efficient DataSource?

Aug 3, 2007

Hi there,
 I'm using a Repeater at the moment which is bound to a SQLDataSource. I expect much load on that Website, should I choose another DataSource? Which other DataSource is better if it's about Performance?
I read some stuff about the SQLAdapter and a DataSet.. is that better in performance? Why is it better?
What about LinQ?
Thanks a lot for any clarification.

View 3 Replies View Related

SQL Datasource And 'Apostrophes'

Jan 2, 2008

I am using a SQLDatasource to populate a dataview as illustrated below.  I run into a problem when I search for a "LastName" that includes an (') Apostrophe ( e.g. O'Reilly) . Searchin for the whole name there is no problem, but when I search for simply O, or O' I get errors.
 I am not sure ...when to address names with an apostrophe...
1) On insertion to the database (using a  "Replace(LastName, "'", "''") 2)  or after they have been entered and they are to be searched for.
If scenario 1, can anyone provide the best way to do this...If scenario 2, how would that be worked into the SQL Datasource code below....
I have tried several variations with the times SQL Datasource to no avail....
I would appreciate any help !
Thanks !
<asp:SqlDataSource ID="SqlDataSource1" runat="server"ConnectionString="<%$ ConnectionStrings:ClinicTest2ConnectionString1 %>"
SelectCommand="SELECT [PatientID], [Accession], [FirstName], [LastName], [Address1], [City], [strddlPatientState], [ZIP], [DOB] FROM [ClinicalPatient] WHERE [LastName] LIKE @LastName ORDER BY [LastName],[FirstName]ASC">
 
<SelectParameters>
<asp:QueryStringParameter Name="LastName" QueryStringField="NameSearch_Result" />
</SelectParameters>
</asp:SqlDataSource>

View 5 Replies View Related

C# Variable In SQL Datasource?

Apr 8, 2008

I have a single variable to be utilitized in my SQL Where clause...
Select *FROM projectsWhere project_id = @id
 How do I use this c# variable in the datasource?
 string TableID; TableID  = "192.AB";
 I know this is simple, but I figured I'd ask. I don't want to do a work around , like a hidden textbox with the value assigned, and then link the datasource to the tb control, seems extremely hackish.
 
 
 

View 3 Replies View Related

Configuring SQL Datasource

May 29, 2008

Hi
When I try to configure a SQL datasource and I use a Microsoft SQL Server datasource I get a blank drop down list for server name.  My aspnetdb is available in SQL Server 2005 and I can log into it through management studio, and the service is started.  I am also using Vista Ultimate.
Is there any other configuration I need to do for Visual Studio 2008 to see the SQL Server instance?
Thanks
 Kwis

View 2 Replies View Related

DataSource Not Found

Apr 4, 2004

hi... i am very new to SQL server.. previously was using MySQL...
now i am trying to connect my project to SQL Server..
but i wasnt able to...
i keep getting errors

System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified at System.Data.Odbc.OdbcConnection.Open() at icms.DB.q(String mySTR) in C:icmsDB.vb:line 30

below is my webconfig
i am not very sure about the value for the user.. because if it is MySQL i can get it from my control centre.. but what about SQL server ? where should i get my value ?

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="db" value="icms" />
<add key="db_user" value="sqladmin" />
<add key="db_server" value="server" />
<add key="db_pwd" value="*****" />
<add key="session_timeout" value="600" />
</appSettings>

<system.web>

<compilation defaultLanguage="vb" debug="true" />
<trace enabled="true"/>
<customErrors mode="RemoteOnly" />

</system.web>

</configuration>


======================


Dim myCMD As New SqlCommand
Public Sub New()
Dim db_server = AppSettings("db_server")
Dim db = AppSettings("db")
Dim db_user = AppSettings("db_user")
Dim db_pwd = AppSettings("db_pwd")
Dim DBConnection As String = "DRIVER={SQL Server};" & _ '<==== is my driver correct?
"SERVER=" & db_server & ";" & _
"DATABASE=" & db & ";" & _
"UID=" & db_user & ";" & _
"PASSWORD=" & db_pwd & ";" & _
"OPTION=3;"
myDB.ConnectionString = DBConnection
myCMD.Connection = myDB
End Sub
'Public Function q(ByVal mySTR As String) As OdbcDataReader 'SQL Query
Public Function q(ByVal myStr As String) As SqlDataReader
myCMD.CommandText = myStr
Try
myDB.Open()
q = myCMD.ExecuteReader(Data.CommandBehavior.CloseConnection)
Catch ex As Exception
Err(ex.ToString)
End Try

End Function
Public Sub c(ByVal mySTR As String)
' COMMAND ONLY
Try
myCMD.Connection.Open()
myCMD.CommandText = mySTR
myCMD.ExecuteNonQuery()
myCMD.Connection.Close()
Catch ex As Exception
Err(ex.ToString)
End Try
End Sub

View 4 Replies View Related

2.0 DataSource Strangeness

Nov 30, 2005

If I add this to my web config ConnectionStrings section:<add name="SQLPubs" connectionString="myServer99;uid=MyUId;pwd=MyPWD;database=MyDB"      providerName="System.Data.SqlClient" />Everything displays correctly, referring to this section in the SQLDataSource ControlHowever, if I add the connection string, exactly as it's listed in the web.config, and INSTEAD of the using that entry, enter it implicitly in the Connectionstring property of the DataSource Control, along with adding the System.Data.SQLClient to the ProviderName property of the DataSource control (which I understood was possible), I get this error:Unable to find the requested .Net Framework Data Provider.  It may not be installedWhat am I missing?here's my tag:<asp:SQLDataSource ID="DS1"  Runat="Server"  SelectCommand = "SELECT top 50 {FieldList}From {TableName}"  ConnectionString="myServer99;uid=MyUId;pwd=MyPWD;database=MyDB"  ProviderName="System.Data.SQLClient"></asp:SQLDataSource>

View 2 Replies View Related

Datasource Question

Apr 20, 2006

im using this datasource to extract values from a database.i simply want to extract the values for ratingsum and ratingcount to populate variables so as to be checked within a code loop.how do i do this? in classis asp would be something like <%=rsRecords(RatingSum)%><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnectionString %>"            ProviderName="<%$ ConnectionStrings:MyConnectionString.ProviderName %>" SelectCommand="SELECT SUM(rating) As RatingSum, COUNT(*) As RatingCount FROM tbl_Rating WHERE Itemid=100">        </asp:SqlDataSource>

View 1 Replies View Related

Sql Datasource Issue

May 10, 2006

I have a simple form that accepts a zip code and a city when the submit button is hit this is triggered...
Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click
Dim Zip, City As String
Zip = txtZip.Text
City = txtCity.Text
grdZipCodes.DataSourceID = "ZipSearch"
ZipSearch.SelectParameters("ZipCode").DefaultValue = Zip
ZipSearch.SelectParameters("City").DefaultValue = City
grdZipCodes.DataBind()
End Sub
This is supposed to populate a gridview with filtered data.  Instead I get nothing, even though in query analyzer  if I dont provide a city or a state all results are returned.  Is there a reason my gridview is not populating.
 
this is what my SQL Datasource is :
 
<asp:SqlDataSource ID="ZipSearch" runat="server" ConnectionString="<%$ ConnectionStrings:something%>" SelectCommand="ZipCodesSearch_s" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter Name="ZipCode" Type="string" Direction=input />
<asp:Parameter Name="City" Type="string" Direction=input />
</SelectParameters>
</asp:SqlDataSource>

View 2 Replies View Related

UNC Path To Datasource.

Dec 1, 2005

In the following example...


EXEC sp_addlinkedserver
@server = 'Shipping',
@provider = 'Microsoft.Jet.OLEDB.4.0',
@srvproduct = 'OLE DB Provider for Jet',
@datasrc = 'C:ShippingShipping BackEnd.mdb'


...can I specify the UNC path of the Access DB instead?

View 3 Replies View Related

Help With Datasource Drivers

Apr 11, 2006

Hi,

New to databases so need some help. While trying to set up data source in control panel, I find that there are no drivers for *mdf files. Just *.dbo and *.xls and others. Can someone tell me what to do. I can't get analysis services to let me access my database, which are *mdf files a friend sent me.

What do I need to do...Can someone help me.

Regards,
Milfredo.

View 5 Replies View Related

Datasource Reader

Apr 28, 2008

I am trying to do incremental extract using Datasource reader.
I need to send a variable in where condition to extract the data base on the max date from other table.


To implement this i have created two variables
1)to get the max date from the table.
2)to store the sql query and send the mad date from other variable to extract the data.

i have give this sql variable in data flow expression.but its not working.

can any one tell me where i am going wrong.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved