Hi,
hopefully someone can help me because this is driving me crazy!! Bear in mind i'm a complete newbie though......be gentle...
I have populated my dropdown with data from the db (and it executes fine). I am then trying to change the data shown in a gridview based on what has been selected via the dropdown. The error i am getting is ORA-12704:CHARACTER SET MISMATCH. I dont understand what the problem is as when I test the query in the new datasource wizard it returns the expected value. Heres the code:
<%@ Page Language="
VB" AutoEventWireup="false" CodeFile="Default2.aspx.
vb" Inherits="Default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1"
DataTextField="CU_NAME" DataValueField="CU_NAME" Style="z-index: 100; left: 193px;
position: absolute; top: 118px">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand='SELECT "CU_NAME" FROM "CU_OFFICES"'>
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="BNP_BANK_CODE"
DataSourceID="SqlDataSource2" Style="z-index: 102; left: 166px; position: absolute;
top: 200px">
<Columns>
<asp:BoundField DataField="SORT_CODE" HeaderText="SORT_CODE" SortExpression="SORT_CODE" />
<asp:BoundField DataField="BNP_BANK_CODE" HeaderText="BNP_BANK_CODE" ReadOnly="True"
SortExpression="BNP_BANK_CODE" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand='SELECT "SORT_CODE", "BNP_BANK_CODE" FROM "CU_OFFICES" WHERE ("CU_NAME" = :CU_NAME)'>
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" Name="CU_NAME" PropertyName="SelectedValue"
Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</div>
</form>
</body>
</html>