|
First, this should have been posted to the ASP.NET forum
During the postback the new values must be persisted to the datasource for your grid. Otherwise, when the grid is re-bound it course knows nothing about the new row.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
how to create web organisation chart using mysql database in C#, ASP.net. Anybody please help me.
|
|
|
|
|
What have you tried so far?
Some third party products provide these features[^].
|
|
|
|
|
I downloaded some organisation chart application in google but it is giving errors and i am not getting proper link. i am using mysql database. If u have any C#.net mysql database organisation chart application please formard me.
Please give any download links related to above if you know. thanks in advance.
modified on Friday, July 23, 2010 3:28 AM
|
|
|
|
|
HOw can i give answer of any question ,that is call by any person about my previous question
|
|
|
|
|
If you mean this question[^], you can use the "Add comment" selector beneath the answers to post a reply to the person who gave the answer.
It's time for a new signature.
|
|
|
|
|
Provide a link to your previous question.
|
|
|
|
|
i written below code to execute it is running but not restoring to database. If you know please reply me.
public void restore_data()
{
StreamReader file = new StreamReader("E:\\BackupMysql1\\travel.sql");
string cmd = string.Format(@"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysql.exe -u{0} -p(1) -h{2} (3) < {4} ", "root","password1#", "192.168.2.50", "travel", "E:\\BackupMysql1\\travel.sql");
ProcessStartInfo proc = new ProcessStartInfo("cmd", @"/C " + cmd);
//proc.RedirectStandardInput = true;
//proc.RedirectStandardOutput = false;
proc.Arguments = cmd;
proc.UseShellExecute = false;
//Process p = Process.Start(proc);
string res;
//res = file.ReadToEnd();
//p.WaitForExit();
//file.Close();
Process p = new Process();
p.StartInfo = proc;
p.Start();
//res = file.ReadToEnd();
p.WaitForExit();
}
|
|
|
|
|
I don't really understand the code but I did notice what looks like incorrect use of parentheses () instead of braces {} around parameter identities 1 and 3 in the line:
string cmd = string.Format(@"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysql.exe -u{0} -p(1) -h{2} (3) < {4} ",
"root","password1#", "192.168.2.50", "travel", "E:\\BackupMysql1\\travel.sql");
It's time for a new signature.
|
|
|
|
|
You don't need to use cmd to run the mysql process. You've only served to complicate your process here.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
problem solved now it is working thank you for all who replied to me
|
|
|
|
|
U can execute through Mysqlcommand as a script.
|
|
|
|
|
Hi All,
I have an application with sends request to a C++ CGI. The response stream comes with a delimiter ( ASC (143) ). I used ASCIIEncoding which returns the data correctly buy wrongly decoded delimiter (I got "?" instead of ASC 143).
I tried UTF7Encoding which returned the delimiter correctly but some data are lost. Does any one has solution for this? I cannot cannot change the CGI layer as its servers as router of more of our legacy applications and my Team Leaders feels that CGI is in perfect shape.
Earlier answers would be appreciated. Thanks in ASAP.
|
|
|
|
|
You have an encoding problem, which you should try and solve using the Encoding class.
There is no such thing as an extended ASCII encoding, or almost everything is an extended ASCII encoding, i.e. most encodings use more than 128 characters and keep the first 128 compatible with ASCII for obvious reasons.
Try using Encoding encoding=new Encoding(codepage); where codepage is an appropriate integer value. In Western-Europe 1252 would be the first one to try. I can't tell for your region though.
Once you have the right Encoding object, either use some of its methods to perform a conversion, or better yet, pass it as an extra parameter to your file operations, e.g. File.ReadAllText(String, Encoding)
|
|
|
|
|
|
Hi,
I am new to Web service. Using ASMX web service, the live data from the database can be shown in Xcelius Dashboard. Sample helloworld.asmx as below used to show "Hello World" in xcelsius dashboard. Xcelsius only support asmx.
<%@ WebService Language="C#"
Class="ProgWS.Ch02.HelloWorldService" %>
using System.Web.Services;
namespace ProgWS.Ch02
{
public class HelloWorldService: WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
}
I have tried by combining code from www.jonasjohn.de/snippets/csharp/sql-connection-example.htm with above code, I am not succeed.
I would appreciate if you could let me know the sample ASMX C# program to connect SQL Server and return data from a table (adventureworks.Person.Contact.FirstName).
Thanks.
modified on Monday, July 19, 2010 10:38 AM
|
|
|
|
|
You connect to SQL Server the same you normally do, wrapping it in a Web Service doesn't change anything.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks for the quick reply, Mark. I have updated as per the "How to get an answer to your question" #7.
I have tried Helloworld.asmx, works fine. I can use the results in xcelsius.
<pre>
<%@ WebService Language="C#"
Class="ProgWS.Ch02.HelloWorldService" %>
using System.Web.Services;
namespace ProgWS.Ch02
{
public class HelloWorldService: WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
}
</pre>
I have tried the below code and got the "This web service does not conform to WS-I Basic Profile v1.1." error.
<pre>
<%@ WebService Language="C#"
Class="csbook.ch15.Example15_3" %>
using System.Web.Services;
using System;
using System.Data;
using System.Data.SqlClient;
namespace csbook.ch15 {
class Example15_3 {
static void Main(string[] args) {
// create an open the connection
SqlConnection conn =
new SqlConnection("Data Source=philshiv;"
+ "Initial Catalog=AdventureWorks;"
+ "User ID=sa;Password=changeme");
conn.Open();
// create a SqlCommand object for this connection
SqlCommand command = conn.CreateCommand();
command.CommandText = "Select * from Person.Contact";
command.CommandType = CommandType.Text;
// execute the command that returns a SqlDataReader
SqlDataReader reader = command.ExecuteReader();
// display the results
while (reader.Read()) {
string output = reader["CompanyName"].ToString();
Console.WriteLine(output);
}
// close the connection
reader.Close();
conn.Close();
}
}
}
</pre>
Thanks for your time. Could you please help me to resolve the issue.
Thanks
modified on Monday, July 19, 2010 3:45 PM
|
|
|
|
|
|
Thanks for the quick reply, Mark. I have updated as per the "How to get an answer to your question" #7.
I have tried Helloworld.asmx, works fine. I can use the results in xcelsius.
<pre>
<%@ WebService Language="C#"
Class="ProgWS.Ch02.HelloWorldService" %>
using System.Web.Services;
namespace ProgWS.Ch02
{
public class HelloWorldService: WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
}
</pre>
I have tried the below code and got the "This web service does not conform to WS-I Basic Profile v1.1." error.
<pre>
<%@ WebService Language="C#"
Class="csbook.ch15.Example15_3" %>
using System.Web.Services;
using System;
using System.Data;
using System.Data.SqlClient;
namespace csbook.ch15 {
class Example15_3 {
static void Main(string[] args) {
// create an open the connection
SqlConnection conn =
new SqlConnection("Data Source=philshiv;"
+ "Initial Catalog=AdventureWorks;"
+ "User ID=sa;Password=changeme");
conn.Open();
// create a SqlCommand object for this connection
SqlCommand command = conn.CreateCommand();
command.CommandText = "Select * from Person.Contact";
command.CommandType = CommandType.Text;
// execute the command that returns a SqlDataReader
SqlDataReader reader = command.ExecuteReader();
// display the results
while (reader.Read()) {
string output = reader["CompanyName"].ToString();
Console.WriteLine(output);
}
// close the connection
reader.Close();
conn.Close();
}
}
}
</pre>
Thanks for your time. Could you please help me to resolve the issue.
Thanks
|
|
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: Bing? Really?
it's just an acronym; he meant to say: Blimey I Need Google
|
|
|
|
|
|