Databases :: Remote Access Mysql Db Odbc?

Mar 29, 2010

I am trying to make connection to a remote database server and I am getting the following message. I think i have to grant access to the client maching from my database server.. How do i grant access to an ip addess?

ERROR [HY000] [MySQL][ODBC 5.1 Driver]Access denied for user 'thelp'@'123.29.14.30' (using password: YES)
ERROR [HY000] [MySQL][ODBC 5.1 Driver]Access denied for user 'thelp'@'123.29.14.30'(using password: YES)

View 2 Replies


Similar Messages:

Databases :: Read Image From MySQL With ODBC?

Sep 29, 2010

I have a problem that I can't figure out. I shall read an images from a column in a MySQL database. I use a simple aspx page and the codebehind file with the code below.

It is ok to read the image if I don't use any parameter value in the where clause, but if I use it, nothing is returned. I don't know if I have done anything wrong in the code. I have also tried to set a proper value on the parameter.value without success. So my conclusion is that the parameter sertup is wrong in my code.

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim PictureID As Integer = Convert.ToInt32(Request.QueryString("id"))
'Connect to the database and bring back the image contents & MIME type for the specified picture

[Code]....

View 1 Replies

Databases :: Passing Parameter Using ODBC - Mysql?

Sep 3, 2010

I'm having problem on passing parameter on odbc because it's not working at all. I tried this using sql and I have no problem at all. All are working fine. Is there a different syntax on odbc? Here's my code:

[Code]....

Or using mysql connector/net to use mysql. I'm having problem installing it because the visual studio integration is not working, so I can't find it on the data source provider.

View 12 Replies

Databases :: Using Parameters In TableAdapter - ODBC Connection To MySql

Feb 15, 2011

I am currently making a website on asp.net and i am creating methods using TableAdapter. I am connected to MySql using an ODBC connection. The select * from department will work perfectly for me but when trying to use parameters i am given an error message on the wizard. select * from department where name = @name gives me the error: Error in where clause near '@' unable to parse query text. also tried select * from department where name = ?: this gives me the error: No mapping exists from dbTypeObject to a known Odbc type.

View 3 Replies

Databases :: MySQL Must Use ODBC Connector - Trying To Pass Parameters?

Jan 19, 2010

I am with GoDaddy (yeah, yeah, don't want to hear it) and must use ODBC to connect to my MySQL database. The connections are working fine but I have a GridView/DetailsView parent/child relationship set up between 3 pages. I know that these pages worked with a .NET Connector locally but after I changed them to ODBC, I only get the first part of the page, nothing that depends on data being selected works. This has led me to believe that I must alter the way I pass parameters to the next request page. I have read some things about using a question mark but I cannot figure out how I should apply it to my page as most examples are in C# or VB. My page is mostly pure ASP.NET and I'm not sure if I still continue to utilize the asp:ControlParameter. the code below.

how to get GoDady to alter their medium trust to accept sockets???? That's all it would take

This is the page my employees will use to view the people in the database and then select them and have a details view of that particular cust_code (customer code) pop up to the right of the gridview:

[Code]....

This is the page ( UpdatePrefCustomers.aspx ) that my employees, who will be allowed access it (yes, I already know how to apply authorization but will do it last before deployment so it doesn't drive me crazy when I preview in browser), will use to add, edit, and delete from the database. It must be accessed first and the other two pages, prefcust_edit.aspx and prefcust_insertt.aspx are called from it by passing the parameter cust_code:

[Code]....

Here is the prefcust_edit.aspx page:

[Code]....

Here is the prefcust_insert.aspx page:

[Code]....

View 8 Replies

Databases :: ODBC 3.51 Driver]Can't Connect To MySQL Server

Feb 17, 2010

System.Data.Odbc.OdbcException: ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on '127.0.0.1' (10048)ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on '127.0.0.1' (10048)

[Code]...

View 5 Replies

Databases :: Does Command Parameter Work While Using Mysql As A ODBC Connection

Jun 6, 2010

I have a problem whenever i run my code i get the following error ERROR [42000] [MySQL][ODBC 3.51 Driver][mysqld-5.1.46-community]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' ('b'), ('Manager'), ('c'), ('d'), ('e')' at line 1 my code works with connector/net but my host does not have it installed so i've had to change my code to odbc which they do have, i have found out the syntax is different and changed my code accordingly my code is as follows

[Code]....

View 2 Replies

Databases :: Mysql Odbc Database - Syntax / Connection Not Close Errors

Aug 18, 2010

[Code]....

I can check whether username exists or not successfully but not for email. any ideas why it isn't working? Error message was that i did not close my connection. using System;

View 1 Replies

Databases :: Connect With Mysql On Remote Pc

Jan 18, 2010

I am trying to connect asp.net with mysql on remote pc. When i am connecting asp.net with localhost mysql it is working properly but when i change "localhost" with IP address it show error.

View 4 Replies

Databases :: MySQL - Can't Connect From Remote Client Code

Sep 29, 2010

I have a MySQL data at a web hotel. I can connect to the database from my web application hosted at the hotel . But trying to connect from a client application running on my PC fails using the same ConnetionString. The error is: Unable to connect to any of the specified MySQL hosts

In fact the method below (the method is protected in the web application) fails in my client application but works in my web application.

[code]....

I just tried to download WorkBench 5.2 and HeidiSQL, both connects to the database from my PC when supplying server and password information.

View 1 Replies

Databases :: Connection MySQL - Using ODBC Datasource - "syntax Error Near Page 1 At Select * From [categories]"

Jun 1, 2010

I have installed MySQL and set up an ODBC driver to point to a database in MySQL. In ASP.NET I have defined a connection string to attach to this MySQL dtabase.

<asp:SqlDataSource
ID="SqlDataSource2"
runat="server"
ConnectionString="<%&#36;
ConnectionStrings:MySQLConnectionString %>"
SelectCommand="SELECT
* FROM [categories]"
ProviderName="<%&#36;
ConnectionStrings:MySQLConnectionString.ProviderName %>">
</asp:SqlDataSource>

However in ASP.NET connection wizard, although the tables are shown, no colums are shown and when I attempt to run the page which uses this datasource I get an error message about a syntax error near page 1 at 'Select * from [categories]'. how to use an ODBC (MySQL) datasource in ASP.NET?

View 7 Replies

Error "[42000] [MySQL][ODBC 3.51 Driver][mysqld-5.1.51-community]" In C# Code (mysql Database Connection)

Dec 21, 2010

My code is to update a record if it already exists in database else insert as a new record. My code is as follows:

protected void Button3_Click(object sender, EventArgs e)
{
OdbcConnection MyConnection = new OdbcConnection("Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=testcase;User=root;Password=root;Option=3;");
MyConnection.Open();
String MyString = "select fil_no,orderdate from temp_save where fil_no=? and orderdate=?";
OdbcCommand MyCmd = new OdbcCommand(MyString, MyConnection);
MyCmd.Parameters.AddWithValue("", HiddenField4.Value);
MyCmd.Parameters.AddWithValue("", TextBox3.Text);
using (OdbcDataReader MyReader4 = MyCmd.ExecuteReader())
{
//**
if (MyReader4.Read())
{
String MyString1 = "UPDATE temp_save SET order=? where fil_no=? AND orderdate=?";
OdbcCommand MyCmd1 = new OdbcCommand(MyString1, MyConnection);
MyCmd1.Parameters.AddWithValue("", Editor1.Content.ToString());
MyCmd1.Parameters.AddWithValue("", HiddenField1.Value);
MyCmd1.Parameters.AddWithValue("", TextBox3.Text);
MyCmd1.ExecuteNonQuery();
}
else
{
// set the SQL string
String strSQL = "INSERT INTO temp_save (fil_no,order,orderdate) " +
"VALUES (?,?,?)";
// Create the Command and set its properties
OdbcCommand objCmd = new OdbcCommand(strSQL, MyConnection);
objCmd.Parameters.AddWithValue("", HiddenField4.Value);
objCmd.Parameters.AddWithValue("", Editor1.Content.ToString());
objCmd.Parameters.AddWithValue("", TextBox3.Text);
// execute the command
objCmd.ExecuteNonQuery();
}
}
}

I am getting the error as: ERROR [42000] [MySQL][ODBC 3.51 Driver][mysqld-5.1.51-community]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order,orderdate) VALUES ('04050040272009',' &' at line 1

The datatype for fields in table temp_save are:

fil_no-->INT(15)( to store a 15 digit number)
order-->LONGTEXT(to store contents from HTMLEditor(ajax control))
orderdate-->DATE(to store date)

View 2 Replies

Databases :: Trying To Access Mysql Database From Aspx.pages Using A Web Config File?

Jul 7, 2010

I am trying to access Mysql database from aspx.pages using a web config file.

My web.config connection string is:

<configuration>
<connectionStrings>
<add connectionString="server-10.xxx.x.xx;uid=xxxxx;pwd=1234;database=Mydb"
providerName="MySql.Data.MySqlClient" />
</connectionStrings>
</configuration>

[Code]...

View 1 Replies

ODBC.Net Connection To MySQL DB

Oct 1, 2010

I'm thinking the problem here is with my SQL Syntax, but I'm not sure and need a fresh pair of eyes to check it out. This is the code I'm using to connect to and then insert into the DB:

OdbcConnection datConn = CreateDataConn();
datConn.Open();
OdbcCommand comm = new OdbcCommand();
comm.CommandText = "INSERT INTO userdata (key, secretkey, uid) VALUES ('" + token + "', '" + secret + "', '" + twitterid + "');";
comm.Connection = datConn;
comm.ExecuteNonQuery();
datConn.Close();

And here is the CreatDataConn() method:

private OdbcConnection CreateDataConn()
{
OdbcConnection dbConn = new OdbcConnection();
dbConn.ConnectionString = "Dsn=MySQL;database=twittertest;option=0;port=0;server=localhost;uid=root;pass=Red!4jedi";
return dbConn;
}

I created a DSN to the database, which is hosted on my machine. When I run the application I get this error:

ERROR [42000] [MySQL][ODBC 3.51 Driver][mysqld-5.1.51-community]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key, secretkey, uid) VALUES ('127090765-i3aZl71LPSVUCPZs9kHSYeBli0vWpbq0BaM1roYC' at line 1

But for the life of me I can't figure out what's wrong with my syntax...It's prolly something simple, but again, I need a pair of fresh eyes to look at this.

View 1 Replies

Databases :: Using Mysql Installed Mysql And Mysql Net Connector?

Dec 26, 2010

i was just using mysql i installed mysql and mysql net connector. its installed successfully but unable tp add to references.

View 3 Replies

Connect ASP Visual Web Developer 2008 To MySQL With ODBC 3.51

Jan 4, 2010

how to connect ASP to MySQL database. I have already install MySQL in my localhost, Add a connection through Data Source (ODBC) in ctrl panel and test connection succeed. Now I want to show the query on my default.aspx page so that I can do the insert / update / delete my table data in MySQL.

View 1 Replies

Parameters In Query The Database Doesn't Update In C# And Mysql Using Odbc

Nov 30, 2010

when i specify values in my update query the query works fine and the database gets updated, but when i use parameters in my query the database does not update here is the code i have written

try
{
OdbcConnection MyConnection = new OdbcConnection(ConfigurationManager.ConnectionStrings["myconn"].ConnectionString);
MyConnection.Open();
String MyString = "UPDATE orddetpabak SET jud1=@jud1,jud2=@jud2,jud3=@jud3,adv=@adv where fil_no=@fil_no AND orderdate=@orderdate";
OdbcCommand MyCmd = new OdbcCommand(MyString, MyConnection);
String j1=DropDownList4.SelectedValue;
String j2=DropDownList5.SelectedValue;
String j3=DropDownList6.SelectedValue;
String j4=TextBox4.Text;
String j5 = HiddenField1.Value;
String j6 = TextBox3.Text;
MyCmd.Parameters.AddWithValue("@jud1",j1);
MyCmd.Parameters.AddWithValue("@jud2",j2);
MyCmd.Parameters.AddWithValue("@jud3",j3);
MyCmd.Parameters.AddWithValue("@adv",j4);
MyCmd.Parameters.AddWithValue("@fil_no",j5);
MyCmd.Parameters.AddWithValue("@orderdate",j6);
Response.Write(DropDownList4.SelectedValue);
Response.Write(" " + DropDownList5.SelectedValue);
Response.Write(" " + DropDownList6.SelectedValue);
Response.Write(" " + TextBox4.Text);
Response.Write(" " + HiddenField1.Value);
Response.Write(" " + TextBox3.Text);
MyCmd.ExecuteNonQuery();
//MyConnection.Close();
}
catch(Exception epp)
{
Response.Write(epp);
}

View 1 Replies

DataSource Controls :: Connecting To Remote Database Using DSN And ODBC?

Mar 25, 2010

In my windows application, i am listing the System DSN's configured on the remote machine in a combobox. Once i select the DSN and click on Connect button, i should be able to connect to the remote database. I am trying to open the connection to the database using ODBC but am getting the below error.

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.

Below is the code sample

string conn = "Provider=MSDASQL;Remote Server=http://BLR1WKD010; Remote Provider=MSDASQL;DSN=" + clsODBC.pDBName + ";UID=" + txtUsername.Text + ";PWD=" + txtPassword.Text;

OdbcConnection odbcConn = new OdbcConnection(conn);

odbcConn.Open();

View 5 Replies

Databases :: MYSQL Using VB With VWD2008 For MYSQL Data Transactions

Jan 11, 2010

I have used ASD.NET code using SQL Database for Transaction operation successfully. By changing the Database Code to interface with MYSQL an Error occurs. If I remove the Transaction Code from within the the application, it works OK by displaying the MYSQL data (Read Only) in the layout of the application. I am using Mysql Essential-4.1.22-win32 and MYSQL Connector ODBC-3.51.2. My objective is to EDIT the MYSQL Data.

View 8 Replies

C# - RROR [HY000] [MySQL][ODBC 3.51 Driver][mysqld-5.5.9]Not Unique Table

Mar 23, 2011

Problem in my sql syntax I get the error:ERROR [HY000] [MySQL][ODBC 3.51 Driver][mysqld-5.5.9]Not unique table/alias: 'WallPosting'

string theUserId = Session["UserID"].ToString();
using (OdbcConnection cn = new OdbcConnection("Driver={MySQL ODBC 3.51 Driver}; Server=localhost; Database=gymwebsite2; User=x; Password=x;"))
cn.Open();
using (OdbcCommand cmd = new OdbcCommand("SELECT WallPosting.Wallpostings FROM WallPosting LEFT JOIN WallPosting ON User.UserID = WallPosting.UserID WHERE
[code]...

View 3 Replies

VS 2008 - ODBC Connection To Local MySQL DB Throws (Datasource Name Not Found)

Jul 9, 2013

I'm busy working on an ASP.NET Web Application (3.5) and can't seem to connect to a MySQL DB. I first created the entire application using a WinForms template and everything works 100%, but as soon as I move the exact same code to the Web Application, I can't connect anymore. Here's the code:

Code:
public class DBC {
OdbcConnection connection;
public bool CreateConnection() {
try {
string connFormat = "Driver={MySQL ODBC 5.1 Driver};Server=[SERVER];Database=[DBNAME];User=[UID];Password=[PWD];";
connFormat = connFormat.Replace("[SERVER]", Properties.Settings.Default.DBServer);

[Code] .....

As soon as I try to create the new OdbcConnection instance, I get the error:

Code: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

As noted this works in a WinForms app, and even more strange is that I don't even specify a DSN name...

All I could find from reading through forums all over the internet is suggestions of downgrading the MySQL ODBC driver version, which I'd really rather not...

View 5 Replies

C# - ERROR [HY000] [MySQL][ODBC 3.51 Driver][mysqld-5.5.9]Column 'UserID' In Field List

Apr 2, 2011

I get an error unsure how to fix it:ERROR [HY000] [MySQL][ODBC 3.51 Driver][mysqld-5.5.9]Column 'UserID' in field list is ambiguous

pblic partial class Search : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
private void PopulateWallPosts(string search)
using (OdbcConnection cn = new OdbcConnection("Driver={MySQL ODBC 3.51 Driver}; Server=localhost; Database=gymwebsite2; User=root; Password=commando;"))
[code]...

View 3 Replies

Databases :: Using ODBC Command And Adding Parameters To It?

Jun 10, 2010

I am using ODBC command and adding parameters to it. But it always keeps on saying procedure proc_Update expects a parameters @id which was not supplies ( this errors comes for all the paramters that I add).

Here is my code:

[Code]....

View 1 Replies

Databases :: Can't Find Sybase ODBC Driver Version 12+

Jun 7, 2010

does anybody have a link to download ODBC DLL connection to a Sybase database?

View 1 Replies

Mysql - Parameters In Odbc - "selected Value" Of Datalist Doesn't Populate Grid Control

Aug 4, 2010

I have a page 3 datacontrols (in order, datalist->grid->listview, the selection from one feeds into the next) works perfectly locally, using dot net connector for mysql. My webhost uses ODBC, and I had to remove [ ] from the select statements in my code and put the table names. I removed the [ ] 's and my page runs, and my 1st/datalist control shows but now my "selected value" of my datalist, doesn't populate my grid control. I imagine theres another peculiarity with the way odbc handles parameters. Here is my original, for my grid:

<asp:SqlDataSource ID="recipegrid" runat="server"
ConnectionString="<%$ ConnectionStrings:exoticingConnectionString %>"
ProviderName="<%$ ConnectionStrings:exoticingConnectionString.ProviderName %>"
SelectCommand="SELECT [Id], [Name], [Cal], [Pro], [Fat], [Carb], [Fiber], [Chol], [Sod] FROM [tblrecipes] WHERE ([filenameid] = @filenameid) ORDER BY [name]">
<SelectParameters>
<asp:ControlParameter ControlID="DataList1" Name="filenameid"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>

example of changes to select that allowed my page to run again: SelectCommand="SELECT tblrecipes.Id, tblrecipes.Name, tblrecipes.Cal, tblrecipes.Pro, tblrecipes.Fat, tblrecipes.Carb, tblrecipes.Fiber, tblrecipes.Chol, tblrecipes.Sod FROM tblrecipes WHERE tblrecipes.filenameid = @filenameid ORDER BY tblrecipes.name">

BTW, I also tried removing my scriptmanager & updatepanel,, and using autopostbacks instead in my controls, jik, and nothing changed so I put it back.

View 1 Replies







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