How to list priviledges
Is there a way to list the privilidges that a user has in MySQL? Thanks, Jesse -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
How to list priviledges
Is there a way to list the privilidges that a user has in MySQL? Thanks, Jesse -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Access to Stored Procedure Solved
I figured out a problem I was having, and just wanted to pass the solution along to anyone who may run into the same problem in the future. I've got a new problem now, but I'll deal with that in a separate message (if necessary). I was getting the error, #42000SELECT command denied to user [EMAIL PROTECTED] for table 'proc' when trying to execute a stored procedure from my ASP.NET application. I gave EXECUTE priviledges to the user, and could not understand why it didn't work. I finally ran across a message I found on Google that stated that you have to give SELECT privilidges to the user on mysql.proc. Once I did that, it's passed that problem. Just wanted to pass that along to anyone that may have a similar issue in the future. Thanks, Jesse -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Function Does Not Exist
I'm using the following code in my ASP.NET application to add a new record to the database, and return the added ID: Cmd=New MySqlCommand(sp_InsertNewCamper,Conn) Cmd.CommandType = CommandType.StoredProcedure paramReqID = Cmd.Parameters.Add(return,SqlDbType.Int) paramReqID.Direction = ParameterDirection.ReturnValue Cmd.Parameters.Add(FirstName,FirstName.Text) Cmd.Parameters.Add(LastName,LastName.Text) Cmd.Parameters.Add(UserName,UserName.Text) Cmd.Parameters.Add(Password,Password.Text) Cmd.ExecuteNonQuery() cID = CStr(Cmd.Parameters(return).Value) When I execute this code, I get the error, #42000FUNCTION fccamp.sp_InsertNewCamper does not exist. However, it DOES exist. I can see it. It's named exactly the same, there are no misspellings or anything. One other difference is that this is calling it a function where it is actually a procedure. I could make this a function, I guess, however, I don't know how to write the code in ASP.NET to grab the return value. I've checked Google, and found very little on this error, and don't even know what to look for in the manual. Does anyone know what might be going on here? Thanks, Jesse -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Command Denied on Stored Procedure
I'm trying to execute a MySQL Stored Procedure from my ASP.NET page: Cmd=New MySqlCommand(sp_InsertNewCamper,Conn) Cmd.CommandType = CommandType.StoredProcedure paramReqID = Cmd.Parameters.Add(return,SqlDbType.Int) paramReqID.Direction = ParameterDirection.ReturnValue Cmd.Parameters.Add(FirstName,FirstName.Text) Cmd.Parameters.Add(LastName,LastName.Text) Cmd.Parameters.Add(UserName,UserName.Text) Cmd.Parameters.Add(Password,Password.Text) Cmd.ExecuteNonQuery() cID = CStr(Cmd.Parameters(return).Value) When I execute this code, I get the error, 42000 SELECT command denied to user 'FCCamp'@'localhost' for table 'proc'. The Stored Procedure is as follows: CREATE Procedure sp_InsertNewCamper( in cFirstName VarChar(30), in cLastName VarChar(30), in cUserName VarChar(30), in cPassword VarChar(30), out AddedID Int) BEGIN INSERT INTO Campers (FirstName, LastName, UserName, Password) VALUES (cFirstName, cLastName, cUserName, cPassword); Set AddedID = LAST_INSERT_ID(); END; The user FCCamp has SELECT rights on this database, but there is no proc table. And I don't know how to assign rights to execute stored procedures if that is even necessary. Anyone know how to take care of that. Thanks, Jesse -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Format for saving date field.
When doing an update or insert into a database with a date field, the format for the data on the screen is m/d/. However, I believe that MySQL is expecting it in the format of -mm-dd. I'm using MySQL in an ASP.Net application. Is there an EASY way to convert to the data to a format that MySQL will allow either with some MySQL function, or with an ASP.NET function? I realize that I could rip the data apart, and put it back in the same format that MySQL is looking for, but there's got to be some easier way. Thanks, Jesse -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Does BLOB=Memo?
I'm a bit new to MySQL. I need to create a Memo field (a field that could contain a lot of information). I know that in some languages, BLOB is a Memo field. Is that the case with MySQL? If so, are there some parameters that I need to use here, or should I use another type to represent my Memo field? Thanks, Jesse -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL .NET Connector
I'm using the MySQL .Net connector to access my MySQL database from my ASP.Net application. I've got kind of a catch 22 thing going on here. I'm getting an error, which indicates that I need to set the debug=true in my web.config file (I realize this isn't a MySQL problem, but bare with me...). Well, it IS set. So, trying to figure out what the issue is, I go into IIS and right-click on the folder with my .net app in it and click the Create button beside the Application name field, it creates an application. Now, I can actually see the line # where AN error occurrs, but it doesn't make sense. It indicates Type 'MySqlConnection' is not defined, however, it IS defined. At the top of the file, I include %@ Import Namespace=MySql.Data.MySqlClient%. Besides this, before I did the Create application thing, I was able to access and view the data on the screen w/o a problem. It's only after doing the Create Application that this is an issue. This may not be a MySQL issue, it may be more of an ASP.NET thing, but figured I'd pass this by y'all first an see if anyone knew what might be going on. Thanks, Jesse -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Stored Procedure Question
I've got a stored procedure I'm trying to convert from MS SQL. I've gotton so far with it, but it's complaining about the INSERT command. It's a very simple stored procedure, so it should easy to figure out, but I'm not familiar with the MySQL Stored Procedure syntax. If someone can point out what I'm doing wrong here, I'd appreciate it: CREATE Procedure sp_InsertNewCamper ( in cFirstName NVarChar(30), in cLastName NVarChar(30), in cUserName NVarChar(30), in cPassword NVarChar(30), out AddedID Int ) BEGIN INSERT INTO Campers (FirstName, LastName, UserName, Password) VALUES (cFirstName, cLastName, cUserName, cPassword) // ERROR RIGHT HERE. AddedID = LAST_INSERT_ID() END; It complains about the INSERT INTO command where I've indicated above, with a Syntac error. What is the proper syntax for this? Thanks, Jesse -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
rename database
How can I rename a database in MySQL 5? I've tried renaming he folder, and that just causes other problems. Some one sent me a stored procedure to try, but it will not execute. There are probably several places that need to be changed, but I don't know where those are. Could someone point me in the right direction? Thanks, Jesse -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
How to rename a database
I need to rename a database. I read somewhere that I could simply stop the MySQL database server and rename the folder that contains the data, re-start MySQL, and I'm good-to-go. However, I tried this, and while it appears to have worked initially, when I try to access one of the tables in the database, I get the error, fccamp.activities doesn't exist. When I rename the folder back to fccamp_dbo, it works just fine. So, how do I rename a database correctly? I'm using MySQL 5.0 in a Windows XP environment. Thanks, Jesse -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Stored Procedure Conversion
I am converting a MS SQL Server ASP application over to use MySQL. I have two simple stored procedures that I need to convert. I have very little experience with MS SQL stored procedures, and none-what-so-ever with stored procedures in MySQL, so I really don't know what this should look like. I'll post the first one, and if I'm able to figure it out, I'll attempt my second one by myself. Here's the stored procedure converted as much as I can get it. CREATE Procedure sp_InsertNewCamper ( in cFirstName NVarChar(30), in cLastName NVarChar(30), in cUserName NVarChar(30), in cPassword NVarChar(30) ) BEGIN INSERT INTO Campers (FirstName, LastName, UserName, Password) VALUES (cFirstName, cLastName, cUserName, cPassword) // error on this line. return LAST_INSERT_ID() /*@@Identity*/ END When I execute this, It bombs on the indicated line stating that there is a syntax error. Thanks, Jesse -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
SQL Statement Conversion
I'm converting an application from SQL Server to MySQL. I have the following query that I need to convert: SELECT A.*, CO = CASE CounselorOnly WHEN 1 THEN 'Yes' WHEN 0 THEN 'No' END FROM Activities a ORDER BY Activity What is the proper syntax for this in MySQL? Thanks, Jesse -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]