|
Error 1 An error occurred while validating. HRESULT = '80004005' C:\Users\VINOD\Desktop\Aftr Solvin Error and validated\MedicalStore)4_08_12\Setup1\Setup1.vdproj Setup1
i got this error while building my setup project in vs 2008
|
|
|
|
|
First off, what does this have to do with C#?
Second, here[^] is more information on the error.
Third, I would recommend using WiX[^] for installers if at all possible. It has many more features, and works a lot better, IMO.
I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image.
Stephen Hawking
|
|
|
|
|
how I can make the intranet developed in c # to connect to several database in SQL Server 2008 R2
|
|
|
|
|
Intranet is also a web application that is hosted within organisation.You can develop it same as web application and host it on system connected with your company's network.
Quote: connect to several database in SQL Server 2008 R2
make connection string for each database and use accordingly.
|
|
|
|
|
This question cannot be answered by a forum thread, it is way too broad. You can certainly build an intranet (web) application that connects to multiple databases. Your data access layer (DAL) must be capable of connection to multiple database (via connections string or whatever strategy you use).
If you have been tasked with this and you are asking this question then I suggest you hire a developer.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I am Brazilian and my English is not very good, sorry if I do not understand what I mean
This is my stored procedure:
DELIMITER $$
DROP PROCEDURE IF EXISTS `SP_NewPassLogin` $$
CREATE PROCEDURE SP_NewPassLogin (IN val_login VARCHAR(15), IN val_password VARCHAR(30))
BEGIN
DECLARE excessao SMALLINT DEFAULT 0;
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET excessao = 1;
IF (val_login <> '' AND val_password <> '') THEN
START TRANSACTION;
UPDATE tbl_user SET password = val_password WHERE login = val_login;
IF excessao = 1 THEN
SELECT 'erro' AS Msg;
ROLLBACK;
ELSE
SELECT 'ok' AS Msg;
COMMIT;
END IF;
END IF;
END$$
DELIMITER;
This is my c# code in btnSave_Click:
private void btnSave_Click(object sender, EventArgs e)
{
using (MySqlConnection conexaoMySQL = Conexaodb.getInstancia().getConexao())
{
try
{
conexaoMySQL.Open();
MySqlCommand cmd = new MySqlCommand("SP_NewPassLogin", conexaoMySQL);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("val_login", frmLogin.NomeLogin.NomeUsuario.ToLower());
cmd.Parameters.AddWithValue("val_password", txtPassword.Text);
string retorno = cmd.ExecuteScalar().ToString();
if (retorno == "ok")
{
MessageBox.Show("Dados atualizados com sucesso!", "Sucesso", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
this.Close();
}
else if (retorno == "erro")
{
MessageBox.Show("Informações Inválidas!", "Erro", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
catch (Exception ex)
{
MessageBox.Show("Houve problemas. Erro: \n\n" + ex.Message);
}
finally
{
if (conexaoMySQL.State == ConnectionState.Open) conexaoMySQL.Close();
}
}
}
According to my research I have to do reference the object, how can I do this?
|
|
|
|
|
You must say on what line the error occurs.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
It means one of your variables returned null and you tried to either get the value of a property or call a method on that null .
Without the exact line that error occured on, it's impossible to narrow this down any further. Your code doesn't check for this condition. For example, conexaoMySQL may be null and you tried to call Open on it.
|
|
|
|
|
Looks like all the objects are created as required; the first suspect I see, is the irrelevant singleton that 'guards' the connection. You might wanna try opening and closing the connection without doing anything else, to 'test' that part of the structure.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Debug and locate an object that is null. That null value is causing this error.
|
|
|
|
|
Can anyone suggest me how to develop a chatting application in C#?
|
|
|
|
|
You're going to have to be more specific than that!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I mean what should I be knowing to make it possible. I am new to the developing field. I need your suggestions.
|
|
|
|
|
You need to use these concepts
1.WCF Web Service with the client polling the service (simple-basic scenario - easy to implement, not very efficient)
2.WCF Duplex Web Service with the server updating clients when needed (a bit more complicated)
3.TCP Socket-based solution, hardest to implement but permits much better control. There is a very good example in Matthew McDonald's book "Pro Silverlight 3"
http://stackoverflow.com/questions/4716279/need-concept-regarding-windows-based-chat-application[^]
|
|
|
|
|
|
The client, or the server? What protocol? Does it need to interface with MSN? Or with Google Talk?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Hi All, I am trying to replace the text of various radiobuttons with data stored in a database. Since this is not a Windows Form application, I had to use the using keyword to create a datatable and because of that the datatable is not visible outside of the using code block. Please take a look at my code below.
string Con = ConfigurationManager.ConnectionStrings["myCon"].ConnectionString;
using (OleDbConnection OleCon = new OleDbConnection())
{
OleCon.ConnectionString = Con;
OleCon.Open();
using (OleDbDataAdapter a = new OleDbDataAdapter("SELECT * FROM CustomerTable", OleCon))
{
DataTable myDataTable = new DataTable();
a.Fill(myDataTable);
}
}
int i =1;
while(i<myDataTable.Count)
{
i++;
}
I get the error message saying that myDataTable does not exist in the current context. How do I make it visible to code outside of the using block? Thanks in advance for your reply.
|
|
|
|
|
Declare it before the using statement.
|
|
|
|
|
You decalre it outside of the using block.
ASPnoob wrote: Since this is not a Windows Form application, I had to use the using keyword to
create a datatable
Uhhh, whether or not this is a Windows Forms app has nothing to do with using a using block. It's a stucture that can be used in any type of application and if you can use it or not depends on the object that your specifying in the using statement. That object must implement the IDisposable interface.
|
|
|
|
|
Hi All,
I am trying to add an element from List1 to List2 if it is not already in List2. The following is what I have and I'm getting the error message List1 is a variable but is used like a method.
List<RadioButton> List2 = new List<RadioButton>();
List<RadioButton> List1 = new List<RadioButton>();
List1.Add(0,null);
List1.Add(1,RadioButton1);
List1.Add(2,RadioButton2);
List1.Add(3,RadioButton3);
List1.Add(4,RadioButton4);
int listIndex = RandNum.Next(1, 4);
int i=1;
while(i<List1.Count)
{
if (!List2.Contains(List1(listIndex )))
{
List2.Add(List1(listIndex ));
i++;
}
}
Please explain what I am doing wrong. Thanks in advance.
modified 20-Oct-12 8:59am.
|
|
|
|
|
Your calls to the Add() method are trying to pass two parameters but Add() only takes one, a reference to a radio button. Also, in the lines at the end starting with
if (!List2.Contains(List1(listIndex )))
your syntax is incorrect for an indexing operation, it needs square brackets not parentheses, thus:
if (!List2.Contains(List1[listIndex]))
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Hi, thanks for replying. I guess the Insert method is what I need if I wanted to add value to a list at a specific index.
|
|
|
|
|
Sounds about right.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I have navigate a website that have a script to print the page on login. when i close the page via code before print dialog shown , the webbrowser shows the print dialog even the page is already closed.
the script use : Document.print()
how to kill thread comes from the page on closing.
i need to close the page and close the print dialog.
please help
|
|
|
|
|
You can't. Once it's presented to the user there is no way for your code to close the print dialog.
|
|
|
|