ss125 18 Posting Whiz in Training

I am also using both IDM and download helper, but i didnt face this problem. The problem will be in the video. Try to play the video for few minutes and check whether its playing properly.

Please also ensure your problem by downloading other videos too.

And there is also a possibility that this can also happen due to your connectivity problems. Please check that also.

Hope this helps u...:D

ss125 18 Posting Whiz in Training

Yes. As @Reverend Jim said, Try to debug your application which helps you to solve most of your problem. If it is not solved, then post the error message and line of code which produces the message.

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

@mavtcr,

Sorry My friend you have to do your own work. All i can do is helping you to find a solution. You can google that. There are lot of sample code regarding this. Just try that first. And then ask when you stuck.

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

I cant understand your problem clearly , as per my understanding the table is populated with a empty row.

Its because of the code

dgvmodstud.Rows(i).Cells(0).Value = String.Empty

If dgvmodstud.Rows(i).Cells(0).Value = currentModuleCode Then

in the above code, its already comparing the currentModuleCode which is declared as String.Empty, and the problem is it has not been assigned a value to check.

Try to assign the value for the variable currentModuleCode and then check it out..

Hope this helps you...

Have a happie 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

Its working properly in both firefox and internet explorer...

My internet explorer version is 7.0.6000.21342

In my office we are running at this version. I will intimate you shortly about the results on IE9...

ss125 18 Posting Whiz in Training

I think the problem is with the statement

Returns Varchar(50)

or may be

RETURN @CategoryString

because the select statement itself will return the result. I am not sure. Anyway a try will never going to return a loss.

Have a happie day... :D

ss125 18 Posting Whiz in Training

You have to reduce your postbacks while calculating the maximum value.

So My suggestion is to use a javascript to get the value and do the following.

1) Store the data in an array as ddanbe said. The array will look like [12,2554,523,..].
2) Use the following code to get the max

Array.max = function( array )
{
return Math.max.apply( Math, array );
};

and regarding the color change, use a CSS class

CSS
.max 
{
  border:2px solid green;
}
javascript
if(condition) 'to check the max number
{
document.getElementById("num1").className = document.getElementById("fName").className + " max";
}

Hope this helps you my friend...:-D

ss125 18 Posting Whiz in Training

From what i understand, you want to populate the particular class students by selecting the combobox?

if thats your question, the answer is you have to change the query to the following.

Dim sqlquery As String = "select * from frmStudentReg WHERE class like '%" & >ComboBox6.SelectedValue & "%'"

you have to change it as

Dim sqlquery As String = "select * from frmStudentReg WHERE class='"&ComboBox6.SelectedValue"'

Hope this helps you my friend.

ss125 18 Posting Whiz in Training

K then. I will go with session itself.

Thankyou @Ketsuekiame

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

@Ketsuekiame,
Thank you. I hope this helps. As I was waiting for the reply, I found out the get() can be used with the combination of PreviousPage. but the problem with that is the data from one page can be accessed only on the immediate next page. But According to you suggestion, the data can be used anywhere within the applicaion..

Am I right on my statement?

ss125 18 Posting Whiz in Training

Sure bro...

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

Store them on the form in a serialised format in a hidden control

@Ketsuekiame
----------------

Ok... You mean passing to data to a hidden field and extract them using a string splitter concept... Am I right?

And one more thing...
What about application variable?

ss125 18 Posting Whiz in Training

Thank you @ChrisHunter and @Ketsuekiame.

A few moments ago, I figurred out a solution to pass the selected values to a query.

My problem is to select multiple username from the dropdownlist and on a single click I have to deactivate all the selected users. At first I am out of solution, but later I figured out the solution.

So here is what I did.

I got all the selected username to followed by a delete user sqlcommand inside the loop.. So my goal is acheived... :-D

saguni commented: That solved my problem too dude.I love you. Thank you. +0
ss125 18 Posting Whiz in Training

nice explanation... I need a suggestion bro...

My problem is to pass data from one form to another.

Till now i was using session or cookies. But now I need to pass nearly 20 to 25 variables.

I heard that storing in session will reduce the performance of the application.

So I am in search of an efficient idea.

Can you (@Ketsuekiame) help me? Or anyone having any other suggestions???

Thank you.

ss125 18 Posting Whiz in Training

put your code bro... So that we can help about your problem...

ss125 18 Posting Whiz in Training

@ Ketsuekiame,
Fine and what is the difference between the application and session?

ss125 18 Posting Whiz in Training

in asp.net my friend.

ss125 18 Posting Whiz in Training

Are you connecting with the ethernet adapter?

If so, Here are some of the troubleshooting steps.

try to ping the other PC...

Check whether you are getting a proper reply from the other PC.

If so, Check whether the ethernet cable is properly inserted.

if the problem exists even after that, try to use an different LAN cable.

Even after that if the problem exists then either one of the PC's driver may be corrupted or malfunctioning.(try to reinstall it).

ss125 18 Posting Whiz in Training

Please can anyone explain clearly....

what is the difference between session and httpcontext.current.session and application variables?

Thankyou in advance...

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

Dani

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

The first thing you have to do when a error popup must be dubugging. So properly debug the code execution flow. check what are the values in the declared variable in you form. By using this, You can easily findout the error and cause for the error.

Since you are new to this,try the following link

http://www.vbforums.com/showthread.php?516261-Using-VB6-Debug-Introduction

anyway try to code it as shown below.

    Private Sub txtpwd_KeyPress(KeyAscii As Integer)
        If KeyAscii = vbEnter Then
        If Len(Trim(txtlogin)) > 0 And Len(Trim(txtpwd)) > 0 Then
        If CheckPwd(txtlogin, txtpwd) = "ok" Then
        MsgBox "Password ok"
        Else
        MsgBox "Wrong password or Login not found."
        End If
        Else
        MsgBox "Login and password should not be blank"
        End If
        End If
    End Sub
    Private Function CheckPwd(cLogin As String, cPwd As String)
        'in my case i will use dao. you probably using ado just convert it
        Dim rs As Recordset, ret As String
        Set rs = opendatabase("c:\temp\login.mdb").openrecordset("select * from tbllogin where ucase(trim(logname)) = '" & UCase(Trim(cLogin)) & "'")
        If rs.RecordCount <> 0 Then
        If UCase(Trim(rs("pword"))) = UCase(Trim(cPwd)) Then
        ret = "ok"
        Else
        ret = "wrong"
        End If
        Else
        ret = "wrong"
        End If
        rs.Close: CheckPwd = ret
    End Function

Because I hope the problem is in your logic. So try the above code logic.

Hope it helps you...

Have a happy coding...:-D

ss125 18 Posting Whiz in Training

I dont know for sure...

FWIR , this may work

You need the "arp -d hostname' repeatedly to accomplish this.

If you wish to automate this using a scheduler

try watching this video.

Click Here

ss125 18 Posting Whiz in Training

simple...

on delete event

You have to get the price 150( or price of anythin) and store it in a variable

then add like the following line

int food_rem =Convert.ToInt32(txtfoodprice1.Text);
txttotal.Text= txttotal.Text-food_rem;

Hope this helps you my friend.

Have a happy coding...:-D

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

k. There are possibilities in 2 stages.

1) in calculation stage
2) in file writing satage

So first check in the calculation stage.

Now use a loop in the main function and try to print all the resultant array and put the output in your next comment.

ss125 18 Posting Whiz in Training

Can u expres what output you get from the aboe code?

ss125 18 Posting Whiz in Training
Forgot to mention

Instead of coding in command you can populate the two parts in the record source. It can simplify your work..

ss125 18 Posting Whiz in Training

I didn't tried that much.

But any way there is a way to do it.

instead of using a single command you have to use two commands.

Command1 must be populated with the even data such as(0,2,4,...)

Command2 must be populated with the even data such as(1,3,5,...)

And in the data report you have to implement 2 repeat lables and link it with the address field in the database.

Since you are a newbie to vb6 and reporting cases I suggest u to visit the complete thread in the below link Click Here

The link contains the problem which u ll going to face in the development phase.So go through it.

So that you can print address easily.

And remember dont keep the fields auto grow option to be false..

Please code it as a fixed size field.

Hope this helps u...

Have a happie coding...:-D

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

What reporting tool are you using ?

ss125 18 Posting Whiz in Training

IF thats the case, Check whether there are any instance conflicts in your SQL Server.

This is the problem which i faced during my college days.
The solutions were
1) Remove the current instance to he database and create the instance with the same name, so that you dont want to change the connection string in all your application.

2) Create a instance with other name and use it all over your application.

Hope this helps u my friend...

ss125 18 Posting Whiz in Training

Only the programs that are installed will only be removed. And it will not affect your files in c: drive[OS drive]...

If its a licensed product you will have the installation schemas with you.

Else If you think that it may cause trouble to other programs try other means like manual editing of registry or there are more software to clean the unwanted registry entries. Both are riskless if you are aware of what you are doing.

So dont worry my friend...

ss125 18 Posting Whiz in Training

Anyway I am not a pro at this.

The reasons for throwing this issue could be wrong server name, disabled remote connection
and firewall blocking.

Could you please follow the steps below to solve this issue?

· Check the server on which SQL Server is running can be accessible. You can use ping command to test that. For instance, ping <computer_name> or ping <IP_address>. The ping command may be block by the firewall, make sure ICMP is enabled in the firewall. More info, check: http://technet.microsoft.com/en-us/library/cc739791%28v=ws.10%29.aspx#BKMK_4.

· Choose appropriate protocol

· Configure Windows firewall accordingly based on what protocol you have chosen to use. For detailed information about how to configure Windows Firewall to allow SQL Server, please check http://msdn.microsoft.com/en-us/library/cc646023.aspx.

· Enable SQL Server Browser Services

You need to enable SQL Server Browser Services if the following are both true:

  1.  SQL Server is not listening on default 1433 port or not use default pipe name \\.\pipe\sql\query;
    
  2.  The corresponding TCP port or pipe name is not specified in the connection string (such as Srv1\SQL2008, 1500).
    

If you have enabled SQL Server Browser Services, you still need to open UDP 1434 port which is used by Browser Services in the Windows firewall.

ss125 18 Posting Whiz in Training

Man...U need to keep an unique field for an update statement.

So do it as follows.

1) Add a hidden textbox which holds the id of the item.

2) declare a string variable prod_id.

3) Then use it as I suggested in the above reply.

It will surely work.

Probably, your mistake will be executing the query without the value to the id field.So do as I said above.

Hope this solves your problem...

Have a happie coding...:-D

ss125 18 Posting Whiz in Training

sqlcmd = New SqlCommand("UPDATE table1 SET [Processor]=@Processor, [Memory]=@Memory, [VideoCard]=@VideoCard, [HardDrive]=@HardDrive, [AntiVirus]=@AntiVirus", sqlconn)

Here is the problem. Use a where clause in the update query, else it will update all the records in the table.So the modifies query string may look like

sqlcmd = New SqlCommand("UPDATE table1 SET [Processor]=@Processor, [Memory]=@Memory, [VideoCard]=@VideoCard, [HardDrive]=@HardDrive, [AntiVirus]=@AntiVirus where [id]=@id", sqlconn)

Hope this solves your problem...

Have a happie coding...:-D

ss125 18 Posting Whiz in Training

For this type, you need to remove the close button on the form by changing its properties.

then to close the form, you have to place the button on the form and code it as

Private Sub button1_click()
me.hide()
End Sub

By Implementing this, you will make the application similiar to running on background. So if the Internet or Lan Connection ahs changed its state it can pop-up a message box regarding the state of the internet connection.

Hope this helps you...

Have a happie coding...:-D

ss125 18 Posting Whiz in Training

A good day to die Hard

ss125 18 Posting Whiz in Training

Are you playing?

ss125 18 Posting Whiz in Training

dbProvider = "PROVIDER=Microsoft.Jet.OLEDB.4.0;"
dbSource = "data source=.\sqlexpress; integrated security = true; attachdbfilename=|datadirectory|\database.mdf; user instance = true;"
conn.ConnectionString = dbProvider & dbSource

I hope the problem is with your connection string.

Try the below link

Check it out

Hope it will help you...

Have a happy coding... :-D