 |
|
 |
I'm trying to connect to a remote MySQL server using a C# application. But when I ran the program, I got a runtime error saying it was "Unable to connect to any of the specified MySQL hosts". Now, the host or server has been successfully tested many times with PHP applications (I can connect to it, read & write information etc.),what can I do to connect to www.example.com whiche I have user name and password.
|
|
|
|
 |
|
 |
i understood the default.aspx page but cant find where to place the other two events ,is in insert button or in page load or in datasource button pls reply me its urgent
|
|
|
|
 |
|
 |
You can download the atached source code.
|
|
|
|
 |
|
 |
This is really nice example you have here... But there was one huge disadvantage is that the messages was not long as 200. In this example that is corrected... http://www.simpa.dk/smr/Projects/asp.net/GridView_DataList_MySql/MySQL.zip
|
|
|
|
 |
|
 |
Yeah this example is pretty old
|
|
|
|
 |
|
 |
Hi
I am writing windows mobile6 application, that access the data remotely from mssql server.Here i am using .NET Compact Framewokr 2.0 for developing above application. But i dono How to connect MySQL server remotely ie., I would like connect to it throught Internet from another computer to update database. I installed mysql connector 5.1/net. can you please give me some suggestions for solving the above problem
Thanks & regards
Asif
|
|
|
|
 |
|
 |
I'm sorry but I don't know.
|
|
|
|
 |
|
 |
Thank you very much for this great example
|
|
|
|
 |
|
 |
Hi,
Have u tried connecting Visual basic 6 and Mysql.
I used Mysql-ODBC 3.51 connector for this.
But am getting error like no open cursor .Can u tell me wats the problem in that.
Do u have any code connect visual basic and Mysql,If so can u post it.
I want to get the datas feom vb text boxes and store it in Mysql.
Thanks
|
|
|
|
 |
|
 |
DELIMITER $$
DROP PROCEDURE IF EXISTS `test`.`UpdateMessage` $$
CREATE PROCEDURE `test`.`UpdateMessage`(IN paramkey INT,IN param1 VARCHAR(50),IN param2 VARCHAR(50),IN param3 VARCHAR(200))
BEGIN
UPDATE FROM message
SET Name = param1, Email = param2, Message = param3
WHERE (message.Entry_ID = paramkey);
END $$
DELIMITER ;
Error Message :
Script line: 4 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 'message
SET Name = param1, Email = param2, Message = param3
WHERE (message.E' at line 3
|
|
|
|
 |
|
 |
Hi. Ur source code really very useful. i have tested and it work well. But my objective is make the insert, deleted, show and updated without the stored proceduces in the database.
If i wan to change it from this code which part of the code i need to make adjustment?
|
|
|
|
 |
|
 |
I do not know how to do that.
|
|
|
|
 |
|
 |
Procedure or function 'InsertMessage' cannot be found in database 'test'.
my database is DB_PERFIL and not test!!
how to make choose?
|
|
|
|
 |
|
 |
Change this code:
name="MySQLConnectionString" connectionString="server=localhost;
user id=myuser; password=mypass; database=test; pooling=false;"
providerName="MySql.Data.MySqlClient"
to:
name="MySQLConnectionString" connectionString="server=localhost;
user id=myuser; password=mypass; database=DB_PERFIL; pooling=false;"
providerName="MySql.Data.MySqlClient"
|
|
|
|
 |
|
 |
Very very thanks for this
i have used your code help in the project currently working
hey thanks dude
|
|
|
|
 |
|
 |
Hi there, your code is great and is the base of my current project. Only i'm extremely new and cannot figure out how to create a DataObjectMethod that will select a record by a record ID. This so i can display a selected record from a gridview control in a formview control.
Cheers
|
|
|
|
 |
|
|
 |
|
 |
Thanks for the reply! I believe when i have the DataObjectMethod i could correctly display the right record in the formview. I'm not quiet that far yet being new and inexperienced my difficulty is in creating selected data method it self, which would have to be similar to your unique data methods using your example with subtle differences as an example:
[DataObjectMethod(DataObjectMethodType.Select)]
public static List GetMessagesByEntryID(EntryID)
{
MySqlCommand cmd = new MySqlCommand("ShowSelectedMessage",
new MySqlConnection(GetConnectionString()));
cmd.CommandType = CommandType.StoredProcedure;
cmd.Connection.Open();
MySqlDataReader dr =
cmd.ExecuteReader(CommandBehavior.CloseConnection);
List MessageItemlist = new List();
while (dr.Read())
{
MessageItem MessageItem = new MessageItem();
MessageItem.Entry_ID = Convert.ToInt32(dr["Entry_ID"]);
MessageItem.Message = Convert.ToString(dr["Message"]);
MessageItem.Name = Convert.ToString(dr["Name"]);
MessageItem.Email = Convert.ToString(dr["Email"]);
MessageItemlist.Add(MessageItem);
}
dr.Close();
return MessageItemlist;
Of course i don't think this would work, it bewilders me as to how you would write such a method. I've tried working off other examples but your methods seem very unique compared with others that either use an MSSQL database or don't use stored pocedures etc. I hope this makes sense.
Cheers again.
|
|
|
|
 |
|
 |
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
|
|
|
|
 |