 |
|
 |
I don't see where you pass the value of EntryID to the ShowSelectedMessage stored procedure.
|
|
|
|
 |
|
 |
Thanks again for replying, i do appreciate it. I think we're really going to see how little I know about all of this now.
I believe, but am probably way off, that i would pass Entry_ID from when selecting a record from the gridview by clicking a asp:hyperlinkfield it will pass the Entry_ID (it would be proID in my case) with the DataNavigateURL so like formviewpage.aspx?Entry_ID={0} and some how I would get that Entry_ID probably with the request.QueryString function on that formviewpage.aspx and send it to the DataObjectMethod perhaps through the objectdatasource which would also have the DataObjectMethod selectmethod as
GetMessagesByID(With something in here probably) returns list if it indeed goes that way.
I know i'm far far out of my level of understanding so understand if you think this is a lost course and don't hesitate to say so. I do appreciate your efforts so far though mate.
|
|
|
|
 |
|
 |
Sorry, i re-read your post and understand what you mean't more. The example of subtle changes to your example was just an indication of what i'm after, i really don't know how to construct a DataObjectMethod like that at all, even from the start. I was wondering if you give an example of one that would work for your example or perhaps a place to go where i could look at theory or syntax behind creating similar DataObjectMethods like yours.
Cheers
|
|
|
|
 |
|
|
 |
|
 |
Ok cheers mate, thanks for your help.
|
|
|
|
 |
|
 |
Hi,
i need some information on how to make an Form communicate with an MySql database i got running on an server. I'm using Visual Studio 2005. The only thing i need to do with my application is to add 3 items to the DB each time i fill in some txtbox.
Hope for some assitiance in this matter
Thanks in Advance
Ben
|
|
|
|
 |
|
 |
Hi,
I would like to know whether Grid view is the right control to develop the online examination application. The requirements are give below.
For one questions may have multiple choice to select the answers. User need to select one answer(using option button controls) or multiple answers(using checkbox controls) based on the question nature. He/She can also enter the comments about the questions. Such ways that there are multiple questions are available in that online examination.
My question is, Is this the gridview is the right control to implement such application or which is the best approach. Please suggest me. It's very urgent.
Regards
H.Ashok
|
|
|
|
 |
|
 |
Hi, i am facing problem by assigning data into the Detailsview item at insert new record section.
I have a set of data like Username, subject, date, location. I have follow the article above to create the Gridview and Detailsview together with ObjectDataSource.
I have no problem with viewing, editing and deleting. Actually i have no problem with normal inserting but i need to auto assign the username into the detailsview 'username' item after the user click at the New button at the detailsview. So user no need to reenter the data again.
I really no idea on either how to assign the data into the detailsview or direct pass the data to the insert function which located in the class.
Please... anyone can help me??? i really need your valuable guidance and advice. thanks
|
|
|
|
 |
|
|
 |
|
 |
Thanks for a good sample
In order to get the sample working out of the box, please note that you now need to have a valid ParameterMarker when using procedures and mysql connector/net. This means prefixing parameters where they appear in MessagesDB class with either '?' og '@'. E.g:
change cmd.Parameters.Add(new MySqlParameter("param1
to cmd.Parameters.Add(new MySqlParameter("@param1.
and so on...
It's possible to toggle these values in web.config with 'old syntax=yes', which means '@'. For possible caveats on using one or the other refer to the help file with mysql connector/net.
|
|
|
|
 |
|
 |
First of all, thx for nice tutorial
But I can't get it to work with my webhost
I get this error:
#42000SELECT command denied to user 'Username'@'IP' for table 'proc'
I can run stored procedures from the "MySQL Query Browser" but not with ASP.net!
It works when i run from my local mysql server (which I have root priv. for).
Edit:
I think I have found the problem: The user running a stored procedure needs SELECT access to the "mysql.proc" table. But I don't think my webhost will give me access to that table. Is there a way around this (MySQL Query Browser must not use that table, since it runs the procedure, where my asp.net page won't)
-- modified at 18:47 Tuesday 26th September, 2006
|
|
|
|
 |
|
 |
I have the exact same problem. Is it posible to specify another databse where the stored procedure is stored?
|
|
|
|
 |
|
 |
This is an old article, but I'm going to answer this for anyone who has this problem. If you get this error it is because you don't have SELECT permission on mysql.proc. MySQL provides a workaround. Set UseProcedureBodies to false in your connection string or your MySqlConnectionStringBuilder instance.
|
|
|
|
 |
|
 |
Your code works perfect but I got some promlem when I try to add someting extra on it. I want click a record on the gridview and go to the next page where shows more detailed information about this record. By doing that, I added a stored procedure something like
"select * from users
where ID=variable_ID"
But I don't know how to write the "select" method in the class.
Anybody can help?
|
|
|
|
 |
|
 |
I found a solution here: still use the same data source on the Detailview control. But add "DetailsView1.PageIndex = GridView1.SelectedIndex" on GridView1's "SelectedIndexChanged" event.
|
|
|
|
 |
|
 |
Very good article.
One note though, your database user needs execute rights on the mysql system database to execute stored procedures in any database schema. Otherwise, works brilliantly.
________________________________
Dewald Troskie
GIS Developer, South Africa
"There are 10 kinds of people,
those who understand binary and
thos who don't"
|
|
|
|
 |
|
 |
Thanks about your report!
You know, i make my own project that connect to database and then i want to show my result to form.
my database is made by MySQL4.1 not 5.x.
I have IP:192.168.1.109, but i use localhost.
how can i make it. i try to connect but i got a recive mess "Unable to connect to any of specified my SQL hosts."
How can i fix it?
hoanglk
|
|
|
|
 |
|
 |
I had the same problem.
I declare my connection string in the web.config file
as:
connectionString="server=localhost; user id=root; password=******; database=amos; pooling=true; port=3306" providerName="MySql.Data.MySqlClient"/>
And take it into my application with:
ConfigurationManager.ConnectionStrings["MySQLConnectionString"].ConnectionString;
But it does not work.
Does anybody know what to do?
StormTrooper
|
|
|
|
 |
|
 |
i thing so mysql under the version 5.0 doesnt support stored procedure
|
|
|
|
 |
|
 |
Are you you handling nulls that are returned? I always try and use the isDbNull so I don't get blowups.
http://peterkellner.net
|
|
|
|
 |
|
 |
I was trying to keep the tutorial simple but I probably should have put a null handler such as: private static object GetNull(object Field) { return Null.GetNull(Field, DBNull.Value); }
|
|
|
|
 |
|
 |
Thanks for posting. I developed ASP.NET 1.1 apps with MySQL for about 2 years. I finally went over to MS-SQL for several reasons:
-More seamless design-time support (drag-and-drop tables to datasets and datagrids)
-.NET/Connector (in)stability: as I would follow their minor revisions, bugs would appear in their connector. A recent example: retrieving an @@IDENTITY value after an insert yields incorrect values in certain situations. I have a bug report submitted on that one.
-And most importantly, the MySQL license. You may think you're getting a "free" database with MySQL. But if you correspond with them and read their Commercial license, you'll realize that using MySQL with an app you write and hope to sell is not free, at least if you don't want to GPL your source code. You have to pay them a $395 license fee if you want to even "link" to a MySQL database (including just using their .NET/Connector libraries). If your apps are hosted on different servers (even if its the same hosting provider), you're looking at another $395 per license. You could encounter this if you re-sell the same app to different customers who want their own hosted instantiation.
Here is the
link to their commercial license concepts.
-- modified at 13:36 Sunday 28th May, 2006
|
|
|
|
 |
|
 |
Wow. Thanks for the info on the license deal. Saved me a lot of trouble possibly. I'm sticking to .mdb files with DB_CONNECT = "Provider=Microsoft.Jet.OLEDB.4.0. Just can't have con-current updates.
|
|
|
|
 |
|
 |
Most hosting providers offer MS-SQL database for about $10/month. If you're building an ASP.NET app that may have multiple people using it at the same time (even just 2), do yourself a favor and just use MS SQL rather than Access. You'll thank yourself for it.
|
|
|
|
 |
|
 |
I couldn't have done better self. I write a blog on MySQL and ASP.NET, and I have pointed to this article as reference (http://electronucleus.blogspot.com/).
Well done.
________________________________
Dewald Troskie
GIS Developer
"There are 10 kinds of people,
those who understand binary and
thos who don't"
|
|
|
|
 |