rapture 134 Posting Whiz in Training

You only handle one value with what you have here. Think about it - how many i's can you have with what you have below? How many j's?

I understand you think since i,j would be different for each row,column that you have it covered but you only have one of each specified. In addition, you don't have anything like a foreach or any other statement that will iterate through more than the first one. How does the program know that you have more than one and to grab them as well?

Maybe you have more code that you didn't post?

Dim i = e.RowIndex
Dim j = e.ColumnIndex
txtefid.Text = dgfacenq.Item(i, j).Value

/// You did realize that this was the same thing repeated right after the first just in a different look right?

Dim i = e.RowIndex Dim j = e.ColumnIndex txtefid.Text = dgfacenq.Item(i, j).Value

In effect if you have this code this way in your program you've just done this

Dim i = e.RowIndex
        Dim j = e.ColumnIndex
        txtefid.Text = dgfacenq.Item(i, j).Value 
        
        Dim i = e.RowIndex
        Dim j = e.ColumnIndex
        txtefid.Text = dgfacenq.Item(i, j).Value
rapture 134 Posting Whiz in Training

What about right after Try inserting

If Me.txtInterestRate.Text <> ""
/// do all of your stuff
End If

rapture 134 Posting Whiz in Training

I'm assuming that you powered the modem and router down - then plugged in the dsl modem and waited until it was up then plugged in the router and waited until it was up then powered on the computers . . . if not you might try that


or else

in your cmd window then did you also try the ipconfig /release and ipconfig /flushdns and ipconfig /renew

rapture 134 Posting Whiz in Training

You can do the Google search yourself - I'm not sure what would run this automatically except for the possibility that the F12 key is stuck?

Too bad it's not a desktop unit, that would be easy to switch and try.

rapture 134 Posting Whiz in Training

Is it a Dell machine?

Ton's of stuff on Pre-boot System Assessment on google - most all related to Dell's

rapture 134 Posting Whiz in Training

I don't think you need to define the string - I would think you could just have

Console.WriteLine(System.Environment.OSVersion.ToString());


Take a look here and see if that doesn't help you move along a little further

http://msdn.microsoft.com/en-us/library/system.diagnostics.consoletracelistener.aspx

rapture 134 Posting Whiz in Training

I used this when working with datagrids recently - hope it helps

http://www.xmlfox.com/datagrid_datagridview.htm

I've also done some formatting in the html of my vb.net application

rapture 134 Posting Whiz in Training

Never mind on last post - I thought you said web forms not win forms . . .

rapture 134 Posting Whiz in Training
rapture 134 Posting Whiz in Training

I've used VB.Net code with windows authentication but nothing else - have you tried using the login controls?

http://msdn.microsoft.com/en-us/library/ms178329.aspx

rapture 134 Posting Whiz in Training

I assumed with so many posts that this one was being worked on . . .

I'm at work so I can't go through everything step by step but I didn't see anything that jumped out at me on your hijack this log. My first thought is that you may have had something that has corrupted your Windows but is gone now.

Can you tell me if there is anything in your event log file that lets us know why your programs are crashing?

Have you tried to do a repair of Windows yet?

rapture 134 Posting Whiz in Training

First of all I would say it's quite possible he will set up a schedule to auto send the message or send it at a later time. If that happens then he wants to remind himself as well. He may also just want them to see that he sent it and is aware, it may not be generated from his system as servers have the ability to auto send emails with a little work.

This should help you with your problem on the auto CC - it will also do a BCC if you prefer

http://office.microsoft.com/en-us/marketplace/EM100870531033.aspx?CategoryID=CE010719621033


it basically just redirects you to this

http://www.ablebits.com/outlook-blind-carbon-copy-bcc-email-addins/index.php

*If this helps don't forget to mark it solved. :)

rapture 134 Posting Whiz in Training

LizR - you are by far the most patient and understanding person I've met in a long time. (well basically we have not met but you get the idea . . .) This guy basically trashes you and you still continue to try to help him. You're amazing - besides that I think you live in the forums but that's another topic.


now mus1010

Either you're not reading your textbook or your textbook bites the big tree branch. If you do what LizR suggests and first write it down in pseudocode or plain english that should help you with the logic which is the hardest part believe it or not.

get an apple
decide to eat the apple or not
if not eat the apple then something_else()
if eat the apple then this()

or whatever, just write down what you need. You can post that if you want and we can make sure your logic is correct. Otherwise if your text is really that bad then look for other c# loop tutorials - there is plenty here to help you if you don't understand them at all - in fact there might be more information here than I really want to tell you but hey, I'm forced to be as kind as LizR (you should apologize, she is only trying to help you the best way. If we give you an answer plainly then you won't learn. And don't get frustrated, …

Salem commented: Quite so, quite so. +21
rapture 134 Posting Whiz in Training

Nickel,

My assumption is that you have a program that isn't wanting to shut down by using this shut down process. I've had problems in the past with adobe not wanting to shut down properly. I don't think that's the problem but the suggestion to post what tasks you have running right before shutdown would probably help. Either that or a hijackthis log . . .

rapture 134 Posting Whiz in Training

I recommend you use this utility to debug and see if that helps

http://www.my-debugbar.com/wiki/IETester/HomePage

edit: if you have not tried 7 in some time I think most of the problems are fixed. I had problems originally as well. Things like, I installed 7 and then couldn't connect to the internet etc - they are all fixed now. ( at least the ones I had initially, and I'm not talking beta either.)

rapture 134 Posting Whiz in Training

What version of ie are you running? I just viewed all six pages with firefox 3 as well as ie7

rapture 134 Posting Whiz in Training

You could also set the breakpoint at the beginning and step through everything if you can't find that - it will be a pain if you're program is huge but if you're in debug mode then they probably are not being hit because you're not getting to that point in the code.

rapture 134 Posting Whiz in Training

If you declare file in advance it's just

Dim file As string

followed with

For Each file in all_files

At least that's how I normally do it

"For Each liListItem In ddlAssigned.Items" is how I've done it

rapture 134 Posting Whiz in Training

Actually I've done some work with datagrids and they can drive you nuts sometimes. As far as I know, the only way to do this is for you to set the border properties for the columns from the HTML side. You will probably not have each individual column listed already you will have to add it and I believe you have to add them all and not just the ones you want changed.

rapture 134 Posting Whiz in Training

There is no way that I know of separate from what is built into Visual Studio. (i.e. there is no \* */ or anything)

In Visual Studio 2005 there is the option to comment and uncomment multiple lines of code. Type your lines just as you need then you highlight them, on the text editor toolbar there are two buttons for this one to comment the other to uncomment. They are just to the right of the indenting buttons.

rapture 134 Posting Whiz in Training

I'm not totally sure what you're asking but ...

I would start by mapping out what you want the system to do and breaking it out into manageable chunks.

If it helps then write out pseudocode or do a flowchart. After that then start picking the pieces that are easiest to you and that will help you build some confidence. Once you get stuck then post what code you have and maybe we can help. (I'm assuming since it's your final project that you can code somewhat . . .)

rapture 134 Posting Whiz in Training

I think this is an assignment for school and it's possible his English isn't the greatest. Or at least his explanation. He also posted that he needed to try to write a program that would show what operating system the program is running on at that time. At least that's my thought. I'm still not clear on what he needs/wants.

I can't imagine he's just asking us to do his assignment for him . . .

his other post:

http://www.daniweb.com/forums/thread145076.html

Arupa,

Show us what code you have so far and maybe we can help you figure out your next step or get past where you're stuck.

rapture 134 Posting Whiz in Training

Thanks,

I think I have it finally - what I did was call the second form and it locked the first and was drawn on top of the first form.

.refresh redraws the form but doesn't refresh the data and thus still appeared to be locked.

I've used

Public Sub ClearLocks()
   Dim strContractNumber As String
    strContractNumber = frmContractView.txtContractNumber
    Call Main.LockRecordClearByRefNumOrUser(frmContractView.txtContractNumber, Main.strUserName)
    Call mdlContractEntry.ContractIsLoaded(frmContractView.txtContractNumber, True)
    
    Call frmContractView.GetContractData(strContractNumber)
    
End Sub

and am testing it now but it's worked a bunch already.

Thanks again

rapture 134 Posting Whiz in Training

Sure - but you have to start it and get some work on your own first. If you're stuck getting started let us know, we can give you some general guidelines but you will probably not find someone who will write the program for you.

Make sure you have read this http://www.daniweb.com/forums/announcement61-2.html
even if it's not homework per se it still applies.

rapture 134 Posting Whiz in Training

Hi all,

I'm stuck - it might be easy but I don't work with VB6 much.

I have a form that is open and has a button on it which opens a second form overtop of it. when the second form opens it locks the first form. Upon exit from the second form I can unlock the first form but it still 'appears' locked, thus I think I need to 'refresh' or reload the first form at that point.

Any ideas?

rapture 134 Posting Whiz in Training

You run grossPay = hoursWorked * payRate

payRate is defined above it but hoursWorked is not - therefore it looks like you're running

grossPay = 0 * (the value of the textbox)

-- move your hoursWorked = textboxHours.Text to above the grossPay = hoursWorked * payRate and see if that helps.

bpacheco1227 commented: a great help +2
rapture 134 Posting Whiz in Training

I suggest you start out with writing down your process on paper - use plain english or pseudocode or something but write it down. Then try to break it down into manageable chunks. If you're stuck on one part then work on another piece. Get as much of it together as possible and then we maybe we can guide you from there.

Think about what sections you are working on and that might help. For instance if you're text is on loops, then you want to loop through the number of times printing out your symbol on each line the number of times you are in the loop (if you are in position 1 then you print 1 of them, then the loop increments to 2 and you print 2 of them and so on until you reach the number equal to what was input)

I'm not sure where you are in your text, but your guide is probably based on what you've read so far.

rapture 134 Posting Whiz in Training

I was about to post the same things as LizR

rapture 134 Posting Whiz in Training

hmm - I'm not sure why you want to stay with excel but maybe this helps

http://www.codeproject.com/KB/grid/Excel_in_CS.aspx

rapture 134 Posting Whiz in Training

Thanks!

I got it now.

rapture 134 Posting Whiz in Training

I'm not getting an error message at all it just doesn't copy out the missing files. That's where I'm confused - so you're saying that file.contains will show a negative 1 if the file isn't found?

So I switched it to

foreach ( string fileName in filesOnServer ){
            string fileWpath = fileName;
            string fileOnly = Path.GetFileNameWithoutExtension(fileName);
            int index = filesOnServer.IndexOf(fileOnly) ;
            if (index >= 0)
            {
           if (!filesInDatabase.Contains(fileOnly) ){

and index is 0 until it hits the !filesInDatabase line then it becomes -1. So that explains why it is -1 thanks.

any idea how to check then to see them if the file isn't in the database?

secondary - why doesn't index change to -1 when it gets to

if ( !File.Exists(SOIDs[index]) ){

List<string> SOIDs;
       List<string> filesInDatabase = GetDatabaseFileName(out SOIDs);
       List<string> filesOnServer = GetServerFileNames();
       foreach ( string fileName in filesOnServer ){
            string fileWpath = fileName;
            string fileOnly = Path.GetFileNameWithoutExtension(fileName);
            int index = filesOnServer.IndexOf(fileOnly) ;
            if (index >= 0){
           if (!filesInDatabase.Contains(fileOnly) ){                          
                    if ( !File.Exists(SOIDs[index]) ){
                        txtFiles.AppendText(fileName + "   " + SOIDs[index] +  "\r\n");
                        File.Copy(fileWpath,SOIDs[index] ); //have to finish this part of the code
                        Application.DoEvents(); 
                    }
                }
            }
        }
        MessageBox.Show("Completed File Matching");
      }
    protected static List<string> GetDatabaseFileName( out List<string> SOID){
        List<string> returnValue = new List<string>();
        SOID = new List<string>();
        using ( SqlConnection connection = new SqlConnection(@"Server=prod;UID=id;PWD=pass;Database=image")){
            connection.Open();                        
                using ( SqlCommand command = connection.CreateCommand() ){
                    command.CommandType = CommandType.Text;
                    command.CommandText = @"select FILENAME, SOID from obj";

                    using ( SqlDataReader dataReader = command.ExecuteReader(CommandBehavior.CloseConnection) ){
                        while ( dataReader.Read() ){ …
rapture 134 Posting Whiz in Training

sorry that's a typo.

for the record -the actual code says SOIDs in all places. The code works when I'm checking those files that do exist, it only breaks when I switch it to check those that do not.

rapture 134 Posting Whiz in Training

Have you seen this?
http://www.codeproject.com/KB/webforms/datagrid_checkbox.aspx?display=Print

(hopefully that's not bad sending you to another site . .. )

or in your search try using some form of datagrid column binding with checkbox

rapture 134 Posting Whiz in Training

You could get a ton of different answers to your question and all of them could be right depending on the situation. My first thought is that you have presented a valid question that you need to discuss with the professor/s (providing you have one and it's not self taught). On one hand you seem to be saying you're more comfortable with Java on the other hand you're talking a lot of .Net - the two won't mix well. (Does Microsoft have a class to certify you in Java?)

If you need to use C# or if you're really trying to understand it better I suggest breaking it down into small bits, using Java when you're stuck and then finding the equivalent in C# to that code. (They are very close you will find- please don't kill me C# fans :P )

rapture 134 Posting Whiz in Training

Hey all,

I know this is probably easy but I'm going cross eyed looking at my code. When I used

List<string> SOID; //SOID is the database name for the filepath
       List<string> filesInDatabase = GetDatabaseFileName(out SOIDs);
       List<string> filesOnServer = GetServerFileNames();
       
       foreach ( string fileName in filesOnServer ){
            string fileWpath = fileName;
            string fileOnly = Path.GetFileNameWithoutExtension(fileName).ToString().ToLower();
            if (filesInDatabase.Contains(fileOnly) ){
                int index = filesInDatabase.IndexOf(fileOnly);
                if (index >= 0){
                    if ( !File.Exists(SOIDs[index]) ){

everything works fine. When I needed to check those which the database did not contain the fileOnly by changing:
if (filesInDatabase.Contains(fileOnly) ){
to
if (!filesInDatabase.Contains(fileOnly) ){
after adding the ! - the program doesn't work properly. While stepping through it I noticed that the index is -1 every time.

rapture 134 Posting Whiz in Training

Thanks again for the help - I have successfully been able to do the compare - although it beat me up pretty good.

I wanted to post the code that I was able to get to work for the compare feature in case anyone else was looking (It's not pretty but works)

Now all I have to do is take the filename and change the name to the last part of the file path. (ie 00033569.TIF to 00001695) then I need to copy the file out to the file path.

I suppose I ought to back up the data first before changing the information so I don't lose it in case something breaks.

List<string> SOIDs;
        List<string> filesInDatabase = GetDatabaseFileName(out SOIDs);
       List<string> filesOnServer = GetServerFileNames();
       
        foreach ( string fileName in filesOnServer ) 
           
        {
            string fileOnly = Path.GetFileNameWithoutExtension(fileName).ToString();

            if ( filesInDatabase.Contains(fileOnly) ) 
            {
                
                int index = filesInDatabase.IndexOf(fileOnly);
                if (index >= 0)
                {
                    if ( !File.Exists(SOIDs[index]) ) 
                    {

                       
                        txtFiles.AppendText(fileOnly + "   " + SOIDs[index] + "\r\n");
                          
                       
                    }
                }
            }
        }
       
    }

    protected static List<string> GetDatabaseFileName( out List<string> SOID) 
    {
        List<string> returnValue = new List<string>();
        SOID = new List<string>();
        using ( SqlConnection connection = new SqlConnection(@"Server=TSQLTVS;UID=*****;PWD=**********;Database=Flowtiva")) 
        {
            connection.Open();

            
                using ( SqlCommand command = connection.CreateCommand() ) 
                {
                    command.CommandType = CommandType.Text;
                    command.CommandText = @"SQL query here";

                    using ( SqlDataReader dataReader = command.ExecuteReader(CommandBehavior.CloseConnection) ) 
                    {
                        while ( dataReader.Read() ) 
                        {
                            returnValue.Add(dataReader.GetString(0));
                            
                            SOID.Add(dataReader.GetString(1));
                        }
                    }
                }
           
        }

        return returnValue;
        }

        protected static List<string> GetServerFileNames()
        {
            List<string> returnValue = new List<string>();

            if (Directory.Exists("\\\\disk2\\images\\Missing Images"))
            { …
rapture 134 Posting Whiz in Training

The file compare is just filenames - they are identical except the server files have the .tif extension but I can use the getwithoutextension to make them exact. The problem is when I find the match then I need to go to the pathname that the server has listed as where the file should actually be. Our system had a problem and we lost a bunch of the files from the server.
Our software reads the pathname from the database and points people to the file that is actually in the server to view it. But a bunch of those files are missing. I got a backup of the 15,000 images and need to put them in their proper place on the server.

Thanks for your help!

rapture 134 Posting Whiz in Training

Thanks to nvmobious but I'm still frustrated, however I do appreciate your help. (although it shows how much farther I have to go just to code simple things)

I don't think I adequately explained my problem, OR I'm too dumb to figure this out.

what I have is approx 15,000 images on one folder in the server - call it //disk2/images

and I have about 300,000 images in a database - call it imagedb

I need to take each image in the disk2 server images folder and search the imagedb until I find a match. When I find the match I have to grab the path that is attached to it so my query for that part has to have image and path in it. After images are matched then I have to check the patch to see if the file exists, if it does move on to the next and if it doesn't then copy the image from disk2 to the path that I grabed from the server and then move on to the next one.

if there is no match then I want to keep a log of that so I can manually check those images to find out what the problem is.

I've looked through the code and tried to use it, I tried to use my own code which I had figured out how to pull the image numbers locally and pull the image number from the database locally but …

rapture 134 Posting Whiz in Training

Hello,
I'm newer to programming and trying to do something that has me stumped. I need to read files from a directory on a server and compare those file names to a field in a database. When I find the file names that are the same, grab a different field which is actually a path to the server and see if the file exists there. If not, copy the file to that location. I've been working on this for quite some time, I have not started working on copying the files so I sort of want to try to figure that out on my own. But I need help in comparing the files, here is what I have so far...

namespace MissingImages
{
    public partial class frmImages : Form
    {
        public frmImages()
        {
            InitializeComponent();
        }

        private void btnGetDirFiles_Click(object sender, EventArgs e)
        {
            
                
               
                DirectoryInfo dirCustom = new DirectoryInfo("\\\\disk2\\images\\Missing Images");
            
                FileInfo[] filCustom;
               
                filCustom = dirCustom.GetFiles(); 
                
                
               
        }

        private void btnOBJTable_Click(object sender, EventArgs e)
       
        {
            SqlCommand cmd = new SqlCommand();

             {
                frmImages rd = new frmImages();
                rd.SimpleRead();
             }
        }

		public void SimpleRead()
		{
			
			SqlDataReader rdr = null;

			SqlConnection conn = new SqlConnection( "Server=TSQLTVS;UID=notreal;PWD=alsonotreal;Database=Flowtiva");

			SqlCommand cmd = new SqlCommand("select FILENAME, SOID from obj", conn);

			conn.Open();

			rdr = cmd.ExecuteReader();        		        
            
                       
     
        }

        
    }
}

This does appear as I step through it to pull the information from both places. The SOID field in the obj table of the database is just a string with the server path in it.

Can anyone help or at least …

rapture 134 Posting Whiz in Training

oh good idea, I hadn't thought of that - I knew there would be things I missed.
Thanks!

rapture 134 Posting Whiz in Training

Hello,
I did a search several ways and didn't see this addressed and am hoping someone can help me. I have a computer that has a fresh install of windows xp on it. When I went to access a website
http://wcmh.weatherplus.com/wxplocal/index.html
the browser locks up and will not unlock - I have to ctrl alt delete to quit it. So I updated the browser and same problem, so I updated the windows media player - same thing - I updated all updates from Microsoft - same thing - I uninstalled/reinstalled windows media player - same thing. I think the weather radar runs on windows media player so my thought was it locks up on streaming media - I actually can only play songs I can't play video at all with anything or it locks.

The drivers are all up to date - I have checked the device manager and all seems ok.

At this point I'm at a loss for what to try next . . .

anyone with ideas?

rapture 134 Posting Whiz in Training

Is this the wrong thread? Nobody have any clues? Did I say something that upset everyone?

rapture 134 Posting Whiz in Training

Hello,
I did a search several ways and didn't see this addressed and am hoping someone can help me. I have a computer that has a fresh install of windows xp on it. When I went to access a website
http://wcmh.weatherplus.com/wxplocal/index.html
the browser locks up and will not unlock - I have to ctrl alt delete to quit it. So I updated the browser and same problem, so I updated the windows media player - same thing - I updated all updates from Microsoft - same thing - I uninstalled/reinstalled windows media player - same thing. I think the weather radar runs on windows media player so my thought was it locks up on streaming media

The drivers are all up to date - I have checked the device manager and all seems ok.

At this point I'm at a loss for what to try next . . .

anyone with ideas?

rapture 134 Posting Whiz in Training

Have you tried last known good configuration yet? What version of Windows are you running?