Click here to Skip to main content
12,560,652 members (47,916 online)
Rate this:
Please Sign up or sign in to vote.
See more: SQL-server-2005 ASP.NET , +
How can i overwrite the SQL server 2005 connection by MySql please help
Posted 21-Jan-13 3:17am
Kenneth Haugland 21-Jan-13 9:21am
That would depend, what have you tried?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

1) install mysql connector[^]
2) add reference to the mysql specific assamblies
3) replace in your code all SQL server specific objects with mysql specific ones according to the documentaton:[^]
4) change connection string:[^]

Not only if you are using EF, you should check this article: Using MySQL with Entity Framework[^]
NISHANTHAYLARA 21-Jan-13 9:35am
Dear bro when I override the connection, The home page doesn't load it shows the following error

This webpage has a redirect loop
The webpage at http://localhost:27083/onlinetradingsystem/Home.aspx has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
Here are some suggestions:
Reload this webpage later.
Learn more about this problem.
Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.
can i have your emailid , mine is [email removed],please help
Zoltán Zörgő 21-Jan-13 9:43am
What home page doesn't load? The url is on your machine.
The error is fairly straightforward: the page http://localhost:27083/onlinetradingsystem/Home.aspx contains a redirect to itself. Check the code, error logs and debug.
I can't help you with this one...
NISHANTHAYLARA 21-Jan-13 9:49am
actually I am new to this platform, can you said howcan i overcomethe redirect loop i am trying on this code

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="home.aspx.cs" Inherits="home" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="X-Large" ForeColor="#FFC080"
Style="z-index: 100; left: 353px; position: absolute; top: 162px" Text="Welcome To Online Trading "
<asp:Panel ID="Panel1" runat="server" Height="357px" Style="z-index: 102; left: 265px;
position: absolute; top: 201px" Width="493px">
 <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="DSN=MySql;UID=root;server=localhost;database=onlinetrading;port=3306;"
SelectCommand="SELECT [accid], [owner], [DOB], [income], [emailid], [experience], [state], [address], [country], [phno] FROM [register] WHERE ([owner] = @owner)" UpdateCommand="UPDATE register SET income = @income, emailid = @emailid, DOB = @DOB, owner = @owner, phno = @phno, country = @country, address = @address, state = @state, experience = @experience" ProviderName="System.Data.Odbc">
<asp:SessionParameter Name="owner" SessionField="owner" Type="String" />

<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" BackColor="#FFE0C0"
DataKeyNames="accid" DataSourceID="SqlDataSource1" Font-Bold="True" Font-Size="Larger"
ForeColor="MediumSlateBlue" Height="166px" Style="z-index: 100; left: 130px;
position: absolute; top: 71px" Width="292px" AutoGenerateEditButton="True">
<asp:BoundField DataField="accid" HeaderText="accid" InsertVisible="False" ReadOnly="True"
SortExpression="accid" />
<asp:BoundField DataField="owner" HeaderText="owner" SortExpression="owner" />
<asp:BoundField DataField="DOB" HeaderText="DOB" SortExpression="DOB" />
<asp:BoundField DataField="income" HeaderText="income" SortExpression="income" />
<asp:BoundField DataField="emailid" HeaderText="emailid" SortExpression="emailid" />
<asp:BoundField DataField="experience" HeaderText="experience" SortExpression="experience" />
<asp:BoundField DataField="state" HeaderText="state" SortExpression="state" />
<asp:BoundField DataField="address" HeaderText="address" SortExpression="address" />
<asp:BoundField DataField="country" HeaderText="country" SortExpression="country" />
<asp:BoundField DataField="phno" HeaderText="phno" SortExpression="phno" />
Zoltán Zörgő 21-Jan-13 9:57am
This code has nothing special in it. Use IE9 Developer toolbar or fiddle to catch first redirect, and see details.
NISHANTHAYLARA 21-Jan-13 9:59am
thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.161026.1 | Last Updated 21 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100