views:

143

answers:

2

Hi!

I am using mysql as db for my asp.net application. Here are the facts:

I am using connection string from web.config which has both username and password. I can do SELECT with tableadapter. When I am trying to do INSERT with tableadapter, I am getting "mysqlexception insert command denied for user" error When I try to do INSERT programatically, i.e. using connection, command object, etc. everything is fine. In this case, I'm reading connection string from web.config, too. This can be only applied to GoDaddy hosting, but on local machine I don't have this kind of problems. Can anyone suggest what can I do to make it work on GoDaddy hosting?

Regards, D

+3  A: 

Does the user, that you are connecting to MySql, have Create permission?

Ardman
I ran create and insert sql queries on phpmyadmin, so I suppose that it has.
Deveti Putnik
+3  A: 

Did a quick search for you, try follows:

http://oscarvalles.wordpress.com/2008/01/31/mysql-insert-statement-does-not-post-in-godaddy-acct-mysql-50/

basically, "The database prefix is needed when you write your insert statement so that it can execute."

ccppjava
This will probably do the work. I'll check and inform you. Than you very much!
Deveti Putnik
automated insert, delete and update scripts have name of database in them, an the name of my database@local and the one on godaddy don't match. that was the problem. :)
Deveti Putnik