ss125 18 Posting Whiz in Training

Then the best thing to do is that unistalling the current one and install other programs like avast, kaspersky of your wish...

PERSONALLY FROM MY EXPERIENCE I RECOMMEND AVAST....

ss125 18 Posting Whiz in Training

When did you recently update the program?

ss125 18 Posting Whiz in Training

Arrays can do this job quite well...

ss125 18 Posting Whiz in Training

You mentioned earlier that you copied some codes from the default login program.

Well you probably copied some unnecessary codes. thats the main cause of the problem.

If you have any question, feel free to ask else kindly marked the problem as solved...

Anyway, Have a happy coding..:-D

ss125 18 Posting Whiz in Training

Based on your question, I think you are a noob to asp.net.

Anyway,I wanna ask a questions.

1) According to your code, you are using text command(query). Then why should it provide a error like that(such as procedure not found exception)?

Soln:
try to create it on your own. no sweat. there are several tutorils available step by step code.

Sugestion:

TRY TO ANALYZE WHY THE ERROR CAME AND THINK BACK WHERE YOU HAVE DECLARED THE PROCEDURE(THE CAUSE FOR THE EEROR) IN YOUR PROGRAM....

Hope this helps you..

Have a happy coding...:-D

ss125 18 Posting Whiz in Training

In Tamil there is statement,"Manusana ivan!!!"

I hope that suits you well @JorgeM...

It means, You are a beast in knowledge...

ss125 18 Posting Whiz in Training

You should pick something that you're interesting in and excel at that before you go and tackle the worlds problem with regards to computing.

what @phorce said, is 100% right according to me.

Once you excel in one field, you will automatically know which one you want to excel next...

Likewise you should go on...

There is no end for learning at all...

ss125 18 Posting Whiz in Training

What antivirus are you using?

or first did you installed antivirus program in your system?

ss125 18 Posting Whiz in Training

k can you try and tell using the following query.. Its for a test purpose.

ds = commm.GetDataSet("SELECT Stu_ID FROM StudentTable");
ss125 18 Posting Whiz in Training

@AARTI SHRIVAS
What you said is a point to be considered, but there is a quote "Revealing the truth is better then hiding them".

ss125 18 Posting Whiz in Training

If my memory serves right,
for the following code,

string sqlCommand = "SELECT * FROM TABLE";
string connectionString = "blahblah";

DataSet = GetDataSet(sqlCommand,connectionString);

GetDataSet()
{
   //...?
}

you need to code something like the following

public DataSet GetDataSet(string ConnectionString, string SQL)
{
    SqlConnection conn = new SqlConnection(ConnectionString);
    SqlDataAdapter da = new SqlDataAdapter();
    SqlCommand cmd = conn.CreateCommand();
    cmd.CommandText = SQL;
    da.SelectCommand = cmd;
    DataSet ds = new DataSet();

    conn.Open();
    da.Fill(ds);
    conn.Close();

    return ds;
}

Hope this helps you...

Have a happy coding...:D

ss125 18 Posting Whiz in Training

Well this is my excel upload file...

if (FileUpload1.HasFile)
                {
                    string fileName = Path.GetFileName(FileUpload1.PostedFile.FileName);
                    string fileExtension = Path.GetExtension(FileUpload1.PostedFile.FileName);
                    string fileLocation = Server.MapPath("~/App_Data/" + fileName);
                    FileUpload1.SaveAs(fileLocation);
                    //Check whether file extension is xls or xslx
                    if (fileExtension == ".xls")
                    {
                        connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + fileLocation + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=2\"";
                    }
                    else if (fileExtension == ".xlsx")
                    {
                        connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + fileLocation + ";Extended Properties=\"Excel 12.0;HDR=Yes;IMEX=2\"";
                    }

                    //Create OleDB Connection and OleDb Command
                    OleDbConnection con = new OleDbConnection(connectionString);
                    OleDbCommand cmd = new OleDbCommand();
                    cmd.CommandType = System.Data.CommandType.Text;
                    cmd.Connection = con;
                    OleDbDataAdapter dAdapter = new OleDbDataAdapter(cmd);
                    DataTable dtExcelRecords = new DataTable();
                    con.Open();
                    DataTable dtExcelSheetName = con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
                    string getExcelSheetName = dtExcelSheetName.Rows[0]["Table_Name"].ToString();
                    cmd.CommandText = "SELECT * FROM [" + getExcelSheetName + "]";
                    dAdapter.SelectCommand = cmd;
                    dAdapter.Fill(dtExcelRecords);
                    con.Close();
                    GridView1.DataSource = dtExcelRecords;
                    GridView1 .DataBind();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("The error is"+ex);
            }

To be frank, I used validation at front end to write in the excel file. So there is no need for checking the empty values of data. But based on your problem you need to check the excel file itself(since it is unknown to me.)

So, I can suggest a way to populate the dataset manually.

The following code shows how to populate the record manually

DataTable workTable = new DataTable("Customers");

DataColumn workCol = workTable.Columns.Add("CustID", typeof(Int32));
workCol.AllowDBNull = false;
workCol.Unique = true;

workTable.Columns.Add("CustLName", typeof(String));
workTable.Columns.Add("CustFName", typeof(String));
workTable.Columns.Add("Purchases", typeof(Double));

after that you have to declare a loop like

while (csv.ReadNextRecord())
        {
            for (int i = 0; i < …
saguni commented: awesome effort!!! Keep it up!!! +0
ss125 18 Posting Whiz in Training

I suggest you to use loops and arrays that is regarding the code resuability. I think @saguni also said that only i hope.
I didnt tried that in vb.net. I tried the same in c#.

And, regarding the code you said

but when i import excel data table without blanks and duplicates it doesn't run

Can you please post that too. because I have to confirm on which logic you are checking the empty records.

Sorry for the Late response
ss125 18 Posting Whiz in Training

what @CimmerianX said is right. Please do that.

ss125 18 Posting Whiz in Training

it has worked once in between

If the above line is true, I can say that there are two possibilities, One is faulty cable which may be faulted due to lightening.

The other thing is you must check whether there is any loose connectivity of cable. I once faced the same situation but that problem was resolved due to improper cable connection to my modem.

ss125 18 Posting Whiz in Training

@Stuugie,
FYI:
There are several areas where we nweed to import or export inside an application. Even I had went accros the problem. Recent times, some clients of our company also asks application with features like these.

@gayzlein,
It can be done my friend. I have done that using c#. You can also do that in vb.net. Here are some link that can help you...

Link1
Click Here

Hope this helps you.

Next time while posting your problem, provide us with the codes you tried. So that we can help you in a easy way.

Have a happy coding...:-D

Stuugie commented: Thanks for the FYI. +4
saguni commented: Yess... This is a trouble in the ass to the developer,but it is a gift to the end user to upload a single file and update the database within seconds... Well said friend... +0
ss125 18 Posting Whiz in Training

There are several reasons for this issue.

Some may be

1) network card disabled.
2) network card malfunctioning
3) OS problems such as improper closing of internet using programs,etc.,

So, Kindly specify when this problem occured. like any new software installation/Uninstallation.

ss125 18 Posting Whiz in Training

Once i too was in a same confusion about the java and C#. Because I am specialized in Java whereas I got the Job in c# platform. I planned to stay there at the company till training period. But now over a month is passed and I am loving it. You know, to write a keylogger application ,in java it takes nearly and minimum 500 lines of code and debugging is also little bit fuzzy. But the whole keylogger application in c# took only 50 lines and the prolem of debugging is also reduced nwhen compared to java.

So dont hesitate, If you wish to be in java, you can. If you need an easy change switch to c#.

FYI, c# also has an advancement called F#...

Try googling it...

Hope this helps you...

Have a happie Coding...:D

rubberman commented: keyloggers? Work for the NSA or some other criminal organization? -3
happygeek commented: +11
ss125 18 Posting Whiz in Training

Well as @nitin said, I remember the head of Google's Android team was also a Indian.

nitin1 commented: damn true!! this proves the intelligence level of Indian Engineers +0
ss125 18 Posting Whiz in Training

The answer is Substring

ss125 18 Posting Whiz in Training

@Trap910,

Well said. I am a recent passed out one. Many of my department in my college as well as some of the university topers of Information Technology department, whom i know doesn't even know to write a add program in basic c. And as Trap910 said, they bought their project from a project center and till now they doesnt even know whats their project is really about.

This is the real fact.

But I also admit that some like IIT is producing more efficient students.

ss125 18 Posting Whiz in Training

@Ahmed.C,

If it is solved then please mark it as solved. :)

ss125 18 Posting Whiz in Training

@Ahmed.C,

I dont know whether there are any inbuilt options,but, I will give you the algorithm to your problem and you should code it probably. If any doubts in your code,Kindly post the code so that we can help further.

First store the path in a string

count the "\" in the string(path).

Loop with the condition to find the the "\" in the string.

so parse the string, If a "\" is encountered, Save the string in a temp variable.

Then repeat the process until count is equal to the value, count=count-1;

if count=count-1, print the temp variable data. It will be your necessary output.

Hope this helps you...

Have a happy Coding...:-D

ss125 18 Posting Whiz in Training

@Ahmed.C,
From what I understand, You need only the drive letter of the file. Am I right?

ss125 18 Posting Whiz in Training

@Reverend Jim,
Your answer is nice...
But, I have a doubt...

Press Key F4 to highlight that control so that the user will know which control was clicked before.

nikki05 asked about how to highlight the previously focused field.
But as per your code,

Private Sub TextBox1_Enter(sender As System.Object, e As System.EventArgs) Handles TextBox1.Enter

You are highlighting the current control.

Am I right in my question?

Please correct me if i am wrong?

ss125 18 Posting Whiz in Training

Fine. I dont know whether VB.NET has any options to do with it.. But If you need a custom round function,I will tell you the logic to create your own round function.

Here it is

1) Get the input in ther string format.
2) Using substring(),find the location of the [.] in the value.
3) now remove all the other number after the first digit of the decimal point using trim().

eg: 6.758698955 => 6.7

4) Store the value before [.] in a variable.

    consider it as variable j

5) then get the value after the decimal point.
6) convert it into integer.
7) now in if condition you have to check two conditions.

7.1) if(i<5)
7.2) if(i>=5 and i!=9)
7.3) if(i=9)
8) Write appropriate code for each statements such as

if(1<5)
    do nothing

ie., 6.4 => 6.4

if(i>=5 and i!=9)
    do calculations based on what type do you want.if u don't need to   do anything, skip this segment.

here is the important thing

if(i=9)
i=o
j=j+1
Now write the output as
textbox1.text=i+"."+j

Hope this logic helps you my friend. :-D

ss125 18 Posting Whiz in Training

fine...as far as i know generally we use the basic roundoff function. But considering your question,I want to answer my question.

What type of rounding do you want?

6.4 => 6
or
6.4 => 7
or
if 6.4=>6.4 but 6.9=>7

FOR WHICH ONE DO YOU NEED THE LOGIC?

ss125 18 Posting Whiz in Training

You can use

Math.Round(<%value%>, <%roundoff decimaltoints%>)

for eg,
Math.Round(6.42, 1)

Hope this helps u... :-D

ss125 18 Posting Whiz in Training

Check whether the file is an read-only file. This is the problem.

ss125 18 Posting Whiz in Training

It seems like your friend has modified the access permission of the file to Read for other users except her.

Ask her to change the file access permissions.

It can be changed by following steps.

1)right click on the file and select properties.
2)select security tab. A list of users with their permissions will be shown to you.
3)Ask your friend to select your username and select full control permission over the file.

Then you can able to modify the file...

Hope this helps u... :-D

If this solution solved your problem, please mark it as solved.
ss125 18 Posting Whiz in Training

Use like this...

con.Open();
SqlCommand cmd = new SqlCommand("select stu_id,t1_eng,t1_tam,t1_mat,t1_sci,t1_soc,t1_tot from sps_stu where stu_id=" + stu_id + " and class='" + cls + "'", con);
cmd.ExecuteNonQuery();
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
GridView1.Visible = true;
GridView1.EditIndex = -1;
con.Close();

Hope this helps you.

Have a happy coding...:-D

ss125 18 Posting Whiz in Training

The method I used is to calculate the grand total in the front end before updating the database and then I will save the database with the total amount and Using labels in the data report i ll print the total.

It will be simple.

Hope this helps you.

ss125 18 Posting Whiz in Training

This is my personnal opinion. If my post hurts anyone,I am sorry. But I have to put this point here

To be frank, the engineering colleges have become an bussiness rather than being as a service to provide knowledge.

Its creating machines that can write for long period without handpain and machines that can memorize anything without understanding.

I am a person who completed my engineering under anna university,Chennai,India. According to the outer world its a heaven for students. But for those who are studying there,its a ___________. I dont wanna to say this here.

Those who wanna to know what i was going to say before kindly check this linkClick Here

ss125 18 Posting Whiz in Training

Its the Blur effect.It can be done in Photoshop also.

TO do that follow these steps.Its simple.

1) Open the image.
2) Select the particular part or the entire image which u need to blur.
3) Go to filter menu and select any kind of blur(i.e., Guassian blur,Motin Blur,etc)
4) The angle and ratio selection window will appear with a zoomed preview.Adjust it based on your necessity.
5)Press ok.

And save the image.

Your Blurred image is ready.

Happie Photoediting...

ss125 18 Posting Whiz in Training

can u please explain what is the error specified by the interpreter? So it will be easy for us to clarify it.

ss125 18 Posting Whiz in Training

There is nothing to get demotivated in this. A true resourseful person will always comes up from the utmost bottom of the line like bubbling of air from under water. You must consider all your failure as a lesson to avoid the failures in the future. Dont get carried away by your failure alone.

Remember,

Failure is the Key to Success

And remember that the same companies will going to offer a job to you, willingly, and you will become such a person who selects the oppurtunities from the list of companies that rejected you now.

Wait for your time.

Keep on trying until your goal is reached my friend.

Regards,
ss125

ss125 18 Posting Whiz in Training

If thats the case, May be some other programs are blocking certain modules of TCP/IP. Check any other services is using it. If yes, Stop that service and try again.

ss125 18 Posting Whiz in Training

I think this problem may be caused by the protocol used or problem with the ports used by the protocol.

On a rare case it may also be caused by the network adapter. i.e, either a WAN or an RJ-45(ethernet).

try to re-install these drivers.

PARTICULARLY THE

TCP/IP

Hope this will help you my friend.