Link to home
Start Free TrialLog in
Avatar of Zipbang
Zipbang

asked on

MySql INSERT, UPDATE AND DELETE ineffective from ASP development machine

This has to be an easy fix, but I have searched high and low and find anything but an answer:

I have an ASP.NET site setup that is successfully querying records over our intranet via the SELECT command.

I am working from another machine besides the MySQL server machine.  Could this be a rights issue?  

I am just starting to add and edit records using INSERT and UPDATE, the commands execute, but there are no results in the tables.  I try the same command (in the console) on the server hosting the MySQL database and the command works fine.

here is what I have in my .aspx.vb code

Dim sql As String
Dim conStr As String = "Driver={MySQL ODBC 5.1 Driver};server={server.domain.com};uid=root;pwd=password;database=database;port=3306"
    
Dim MyConn As New OdbcConnection(conStr)
sql = "UPDATE table SET notes ='testing' WHERE idprojectid='169'"
Dim cmd As New OdbcDataAdapter(sql, MyConn)

Open in new window


If I do the same thing above with a SELECT command configured to read data, it will work.

Since the UPDATE and INSERT seem to work on the server machine in the console, I am thinking it is an access rights issue when doing this from a web page?

thank  you
ASKER CERTIFIED SOLUTION
Avatar of wolfgang_93
wolfgang_93
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Zipbang
Zipbang

ASKER

@wolfgang 93

I'm quite sure you have the solution here, but let me be clear as I'm still having no luck.

I created another user account on the server (using Toad) and gave this user rights for INSERT and UPDATE for this database and the same rights in the master list.

I then changed my connection string to have this user and password.

This did not work.

I created a user name like so:    j_smith@%

this did not work, so I tried:  j_smith@server.domain

and this did not work.

Can you see where I am still wrong?

thank you.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Zipbang

ASKER

Good job, thanks for the prompt help!!