[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Chris

4/3/2002 10:55:00 PM

I have check out some of the examples and have not been successfull in
implementing a datagrid with mysql. Has anyone got these two to work?


2 Answers

Scott Billsborough

4/4/2002 8:03:00 PM

0

I have, see if this helps. This requires odbc .net.

Scott

"Chris" <cscherrett@hotmail.com> wrote in message
news:uki9tk02BHA.2792@tkmsftngp05...
> I have check out some of the examples and have not been successfull in
> implementing a datagrid with mysql. Has anyone got these two to work?
>
>


begin 666 ODBCtestCS.aspx
M/"5 (%!A9V4@3&%N9W5A9V4](D,C(B!$96)U9STB=')U92(@)3X-"@T*/"5
M($EM<&]R="!.86UE<W!A8V4](E-Y<W1E;2Y$871A(B E/@T*/"5 ($EM<&]R
M="!.86UE<W!A8V4](E-Y<W1E;2Y$871A+E-Q;$-L:65N="(@)3X-"CPE0"!!
M<W-E;6)L>2!.86UE/2)-:6-R;W-O9G0N1&%T82Y/9&)C(B E/@T*#0H\:'1M
M;#X-"B @(#QH96%D/@T*(" @/"]H96%D/@T*(" @#0H@(" \<V-R:7!T(&QA
M;F=U86=E/2)#(R(@<G5N870]<V5R=F5R/@T*(" @#0H@(" @(" @(" @<')I
M=F%T92!V;VED(%-U8FUI=$)T;E]#;&EC:RA/8FIE8W0@<V5N9&5R+"!%=F5N
M=$%R9W,@92D@>PT*(" @#0H)"4UI8W)O<V]F="Y$871A+D]D8F,N3V1B8T-O
M;FYE8W1I;VX@;7E#;VYN96-T:6]N(#T@;F5W($UI8W)O<V]F="Y$871A+D]D
M8F,N3V1B8T-O;FYE8W1I;VXH(D12259%4CU[37E3<6Q].U-%4E9%4CUL;V-A
M;&AO<W0[54E$/7)O;W0[4%=$/71H97!A<W,[1$%404)!4T4]<G5N;FEN9SLB
M*3L[#0H-"@D)4W1R:6YG('%U97)Y(#T@(G-E;&5C=" J(&9R;VT@<G5N<R([
M#0H)"4UI8W)O<V]F="Y$871A+D]D8F,N3V1B8T1A=&%!9&%P=&5R(&%D87!T
M97(@/2!N97<@36EC<F]S;V9T+D1A=&$N3V1B8RY/9&)C1&%T84%D87!T97(H
M*3L-"@D)861A<'1E<BY396QE8W1#;VUM86YD(#T@;F5W($UI8W)O<V]F="Y$
M871A+D]D8F,N3V1B8T-O;6UA;F0H<75E<GDL(&UY0V]N;F5C=&EO;BD[#0H)
M"41A=&%3970@9&%T87-E=" ](&YE=R!$871A4V5T*"D[#0H)"6%D87!T97(N
M1FEL;"AD871A<V5T+" B<G5N<R(I.PT*#0H-"@D)37E,:7-T+D1A=&%3;W5R
M8V4@/2!D871A<V5T+E1A8FQE<ULB<G5N<R)=+D1E9F%U;'16:65W.PT*"0E-
M>4QI<W0N1&%T84)I;F0H*3L-"B @(" @(" @("!]#0H@(" -"B @(#PO<V-R
M:7!T/@T*#0H@(" \8F]D>3X-"B @(#QF;W)M(&%C=&EO;CTB:6YT<F\X+F%S
M<'@B(&UE=&AO9#TB<&]S="(@<G5N870](G-E<G9E<B(^#0H@(" \87-P.F)U
M='1O;B!T97AT/2),;V]K=7 B($]N0VQI8VL](E-U8FUI=$)T;E]#;&EC:R(@
M<G5N870](G-E<G9E<B(O/@T*#0H@(" \05-0.D1A=&%'<FED(&ED/2)->4QI
M<W0B($AE861E<E-T>6QE+4)A8VM#;VQO<CTB(V%A86%D9"(@0F%C:T-O;&]R
M/2(C8V-C8V9F(B!R=6YA=#TB<V5R=F5R(B\^#0H@(" \+V9O<FT^#0H-"B @
8(#PO8F]D>3X-"B @(#PO:'1M;#X-"@T*
`
end

Carlos

4/5/2002 4:39:00 PM

0

Ok i got it to work with both MyODBC and MyOLEDB... Here's an example for
MyOLEDB..first download it!

MyOLEDB 3.0 http://mysql.psinet.cl/Downloads/Win32/My...

In your test Database in MySQL create a table named Customer and insert some
values for testing.

(testing.aspx) = copy and paste = (change User ID and Password!!)
___________________________________________________
<%@ Import Namespace = "System.Data" %>
<%@ Import Namespace = "System.Data.Oledb" %>

<html>

<script language="VB" runat="server">
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)

dim str as string = "Provider=MySqlProv.3.0;Data
Source=test;Password=xxxx;" _
& "User ID=userid;Location=localhost;"

dim cn as new OledbConnection(str)

dim cmd as new OledbDataAdapter("Select * From Customer",cn)

dim ds as Dataset

ds = new dataset()

cmd.fill(ds,"Customer")

dg.datasource = ds.Tables("Customer").DefaultView
dg.databind


End Sub
</script>

<body>

DataGrid Control
<asp:Datagrid id="dg" runat="server"/>

</body>

</html>
____________________________________________


"Chris" <cscherrett@hotmail.com> escribió en el mensaje
news:uki9tk02BHA.2792@tkmsftngp05...
> I have check out some of the examples and have not been successfull in
> implementing a datagrid with mysql. Has anyone got these two to work?
>
>