Asp.net E Mysql
#1
Posted 24/09/2009, 19:21
Estou tentando usar o ListBox, mas está dando o seguinte erro Keyword not supported: 'driver'.
Alguém sabe como posso solucionar?
Estou utilizando como base de dados o MySQL
HTML:
<form id="form1" runat="server">
<asp:ListBox ID="ListBox1" runat="server" DataSourceID="SqlDataSource1"
DataTextField="titulo" DataValueField="codigo"></asp:ListBox>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString_Mysql %>"
SelectCommand="SELECT * FROM [anuncios]">
</asp:SqlDataSource>
</form>
WEB.CONFIG:
<add name="ConnectionString_Mysql" connectionString="driver=MySQL ODBC 3.51 Driver; Server=servidor;Database=bd;uid=user;pwd=senha"
providerName="System.Data.SqlClient" />
http://lattes.cnpq.br/9132700064717562
http://www.efium.com.br/
http://twitter.com/jlemosmoreira
#2
Posted 24/09/2009, 22:15
Olá Pesoal,
Estou tentando usar o ListBox, mas está dando o seguinte erro Keyword not supported: 'driver'.
Alguém sabe como posso solucionar?
Estou utilizando como base de dados o MySQL
HTML:
<form id="form1" runat="server">
<asp:ListBox ID="ListBox1" runat="server" DataSourceID="SqlDataSource1"
DataTextField="titulo" DataValueField="codigo"></asp:ListBox>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString_Mysql %>"
SelectCommand="SELECT * FROM [anuncios]">
</asp:SqlDataSource>
</form>
WEB.CONFIG:
<add name="ConnectionString_Mysql" connectionString="driver=MySQL ODBC 3.51 Driver; Server=servidor;Database=bd;uid=user;pwd=senha"
providerName="System.Data.SqlClient" />
Boa noite Jackson.
Remova o a key driver e ponha o atributo providerName="MySql.Data.MySqlClient"
E me informe se funcionou, nessa parte de ADO é complicado ehhe, você faz uma vez e depois nunca usa rs..
Testa ai se não der certo eu pesquiso para te dar uma resposta correta.
Microsoft Certified Prrofessional | MCP .NET
RenatoMaia.Net.br tudo sobre desenvolvimento .Net e Tecnologias.
#3
Posted 22/10/2009, 15:44
- brasil2011 likes this
*************************************************
#4
Posted 25/07/2011, 23:49
#5
Posted 17/11/2017, 02:13
Female Viagra For Sale Cialis Generique Site Fiable viagra Cialis Canada Fr Viagra Online Fast
Amoxicillin No Rx cheap cialis Buy Tamoxifen No Prescription Viagra Vente Canada Cialis 5mg Best Price
0 user(s) are reading this topic
0 membro(s), 0 visitante(s) e 0 membros anônimo(s)