G_Waddell 131 Posting Whiz in Training

Santa or father Christmas represents St. Nicolas.. However the red coat comes from a Coca Cola advert... He used to be green

G_Waddell 131 Posting Whiz in Training

I have visual studio 2013 and 2012 and 2010 and I'd much rather develop in 2010. Hate the dull horrible interface THAT SHOUTS AT ME all the time in 2012 and 2013.I know they have new features, support .NET 4.5 etc. but as a working environment that new interface would be a basement compared to the open plan office look of 2010 and earlier versions and I know where I'd rather work...

G_Waddell 131 Posting Whiz in Training

I just spotted another legal hole in the "contract" if a person is not legally allowed to appear in these photos due to being under the age of consent then surely they are not legally allowed to give their consent for them to be used or legally allowed to consent to the terms and conditions of said contract i.e. it is worthless unless their legal parent or guardian enters into the contract.

G_Waddell 131 Posting Whiz in Training

Christmas is all a matter of perspective, for instance, for me Christmas is December 25th but it does actually not fall on Christs birthday (As Diafol pointed out, it was a part of a p.r. campaign by the early Christian church in the west to put it on the same time as the pagan winter solstice festivals,) Eastern Christian churches celebrate Christmas in January for example. To me the holiday has morphed from a religon basis to that of mainly commercialism but the good thing about it is it is a time when family can all get together.

Interestingly after the reformation in Scotland, the church outlawed all festive behaviour and declared that the day should be one of penance, fasting and prayer so all the celebratory parts were moved to New Years (Hogmanay,) hence in Scotland we tend to go all out in celebration at Hogmanay (party starts on 31st and lasts until the 1st or 2nd).

G_Waddell 131 Posting Whiz in Training

I think the rule of thumb with regard to h comes down to the hardness of the sound. A hard 'h' should be preceded by 'a', e.g. a hard rock and a soft 'h' should be preceded by 'an', e.g. an hour.

Correct but like the rest of English there is no actual hard and fast rule. I think it comes as a "hangover" from older forms of the English language and its roots in Celtic / Germanic / Latin. For instance, I have started studying Gaelic (Irish) and in that language you add a letter to the start of a word (called an Uru) to soften or harden the sound of the start of word.

Another interesting fact is, although modern English has no mascline and feminine forms, older versions did which is why a ship is a "she", a dog a he, and, a cat a she.

G_Waddell 131 Posting Whiz in Training

Hi,
Does Access support binary data? If it does, This link here is an example of doing it with MS SQL Server If not, SQL Server Express is free and will support it.

G_Waddell 131 Posting Whiz in Training

Hi,

I assume that your debugging msgbox shows there are row in the datatable, have you tried setting the crystal reports datasource directly to the datatable instead of using a "testreport" (which is some sort of class?)?

G_Waddell 131 Posting Whiz in Training

Hi,

Have you attempted any of this yourself? Where is your code and what errors did you get?

  1. Use System.IO to browse the folder
  2. Use a menubar with the buttons linked to the shortcuts to "navigate"
G_Waddell 131 Posting Whiz in Training

Nostalgic waves are sweeping over me....

My first console was I think called a GrandStand something or other - we are talking around about 1984 - it came with three or four games, a "gun" and two built-in controllers it played a shooting game, Tennis (Pong clone) and football (pong with two bars per side) the nine year old me thought I was at the cutting edge! then I got an Atari 2600 (WOW you can play different games!) but the games were very pricy! After that it was on to my first computer, the might ZX Spectrum all 48k with a tapedeck this lasted me until the earlier 90's when I replaced it with an Amiga 1200 (finally a disk drive!) a few years after that I was off to University and got my first P.C.

Funny thing is although the graphic were very limited on the Spectrum, and the Amiga didn't have half the power of a modern P.C. I thought the games were actually far better to play.. I remember me and my friends playing games like Sensible Soccer into the wee small hours on a Friday night on the Amiga until Mum or dad came and chucked them all out because we were keeping everyone up with all the noise! I even had the first Civilisation game on the Amiga and Elite Frontiers as well...

G_Waddell 131 Posting Whiz in Training

The Porsche they were driving actually produces more power than an 1980's F1 car. Also, unlike most modern cars the GT4 is primarily built for the track not the street and as such has many of the features that most drivers take for granted traction control, Electronic stablity programs etc. have been removed or retuned for track use. The idea being that you can drive it to the track and race it but it shouldn't be your everyday car.

As for Paul Walker, didn't know the man but did see a series on Discovery channel with him in it about researching and conserving the Great White Shark where they brought the sharks up on a platform measured took readings and tagged them. He was involved not only as a sponsor and presenter but he was actually out in the boat helping the guys with the sharks

G_Waddell 131 Posting Whiz in Training

The good old local traditional Fish and Chip shop! But not too often!
When out after an evening drinking in Dublin (again not too often especially nowadays,) I tend to find myself in Zaytoon - it's an authentic kebab place everything is freshly made in store - they even have a guy rolling out dough and making pitta bread from scratch on a little oven thing!

G_Waddell 131 Posting Whiz in Training

My main pet peeve is when an oh so helpful “spelling” program insists on marking up words as misspellings (or worse, “auto-correcting”,) when they are typed correctly because I write in English not American English. E.g. colour, (and ironically,) localise etc.

G_Waddell 131 Posting Whiz in Training

@jwenting
One man’s terrorist is another man’s freedom fighter - Black and coloured people were terrorised in South Africa every day by the Police and the Army - they were second class citizens. A black man or woman was liable to being arrested and beaten by the Police. School children were shot at with live ammunition for demanding the right to a fair and equal education.

@Warrens80 - You want to know why Mandela is considered a great man? He lived through years of oppression, spent twenty years in prison and then when he came out he became the first truly democratically elected president of his country and he forgave. He did not seek out revenge. He did not expel the white people or tell them they could only live in certain areas, deny them a fair and equal education, give then second class public services – he forgave and forgot and offered hope and peace. The nightmare of the white South African was that when and if the non-whites got power that they would take revenge, that there would be a civil war or mass killings ethnic cleansing etc. What happened was Mandela and he tried to unite the country as one.

G_Waddell 131 Posting Whiz in Training

Hi,

Put a break point in where you generate your sql query and a watch on the SQL query. Now copy the query text into Access querybuilder in SQL mode - Run the query in Access - does it work? Also does Access Edit/change your query?

G_Waddell 131 Posting Whiz in Training

Hi,

Did you specify the Update, Insert, and Delete commands for your dataadapter to use with the Update method

G_Waddell 131 Posting Whiz in Training

Hi,

It could be any process that has the file open - tell me, by any chance did you run through a debug on this process before that opened the file but exited the process before it had a chance to close it? In which case it could be your orginal debug run which has locked the file.

If you are not going to modify the file in anyway try opening it in read only mode.

Also, try rebooting the machine and see if it will let you access it then - if so, whatever process locked the file has ended. I think in later versions of Windows there is away to see who/what has a file open, but I can't remember exactly how you do it (under the right mouse click?)

G_Waddell 131 Posting Whiz in Training

OR
If you know the number of columns in the view then loop through the rows with a watch on each column in the datarow.

G_Waddell 131 Posting Whiz in Training

Not straight off the bat, if you put a watch on the dataview you should then be able to see a count of the rows and columns...

Then add a quick watch for each row / column combo...

i.e. dataview.Rows(0).Column(0).value

G_Waddell 131 Posting Whiz in Training

Hi,

Maybe explain the holt winters forecasting method? Is it a formula or a set of actions to be carried out?

G_Waddell 131 Posting Whiz in Training

Thanks Tigergeek,
Thats the joys of working in a small company, I'm a developer by trade but you have to be willing to try your hand at everything. I think an upgrade to 2008 SBS then may be the easiest move.

G_Waddell 131 Posting Whiz in Training

We are the borg prepare to be assimilated...

G_Waddell 131 Posting Whiz in Training

Hi,

The Visual Basic versions are the pre .NET versions, the Visual Basic.NET versions are the versions of Visual Basic that run on the .NET framework.

Yes, there are differences between the two but if you have Visual Basic experience it should not be a huge "jump" to Visual Basic.NET.

In fact, the advantages to programming in VB.NET as opposed to VB will encourage you to move over as you become more familiar with VB.NET. For instance, in VB if you wanted a user to navigate to a file on the computer, you used to have to put a DriveListBox, a DirListBox and a FileListBox on your form and link them all in your code just to allow the user to select a file. In Visual Basic .NET you can now just use a single control, the OpenFileDialog this control opens a the standard Windows dialog and allows the user to select the file returning the filepath to you the only coding you worry about is processing the the filepath.

There should be plenty of resources out there to enable you to switch between the two, I'd recommend looking at the Microsoft Virtual Academy there free online courses there and I'd expect them to have a VB.NET one.

G_Waddell 131 Posting Whiz in Training

Hi,
What is MyRead? a Dataset? an adaptor? a Reader? some sort of data layer class?

I don't think you need the brackets around the information_schema.columns in your query, I tried it on SQL 2008 R2 and got a syntax error.

Your results will bring back a lot of data, if you only want column name and ordinal postion then try Select ordinal_Position, COLUMN_NAME FROM information_schema.columns WHERE (table_name ='Tb_test' ORDER BY ordinal_position

Try and put more steps or error handling in your code to identify what has happened and debugg with step by step i.e. Instead of just going straight into your loop see if you have results returned from your query first...

I'll use the example I gave you first modified with the query you used:

try
    dim cmd as new sqlcommand()
    cmd.connection = Myconnection
    cmd.CommandText = "SELECT Ordinal_Position, COLUMN_NAME FROM " & _
            "'Tb_test' ORDER BY Ordinal_Position"

    'Check connection is open 
    If MyConnection.State <> ConnectionState.Open then
        MyConnection.Open
    End if

    dim Reader as SqlDataReader = cmd.ExecuteReader

    'Check we get a result
    If Reader.HasRows then
        'we have rows
        While Reader.Read()
            txt2.Items.Add(Reader.GetSqlString(1))
        End While
    else
        'put in for debug purpose you can remove if not necessary
        Messagebox ("No Data Returned")
    end if
    Reader.close
Catch ex as Exception
    'unhandled errors
    messagebox.show(ex.message)
end try
G_Waddell 131 Posting Whiz in Training

Hi,
Try something like this:

Sub PopulateComboWithFieldNames(byref TableName as string, byref Combo as ComboBox, ByVal connection As SqlConnection)
 Dim cmd as new SQLCommand  
 Dim reader As SqlDataReader
 cmd.Connection = connection
 'I'd recommend using a stored Procedure with TableName passed as parameter
 'But for sake of clarity I'll do it like this...
 cmd.CommandText ="SELECT TOP 1 * FROM " & TableName

 if connection.state <> ConnectionState.Open then
     connection.open
 end if
reader = cmd.ExecuteReader()
 Dim schemaTable As DataTable = reader.GetSchemaTable()
 For Each row In schemaTable.Rows
        For Each column In schemaTable.Columns
         Combo.items.add(Column.ColumnName)
        Next           
    Next
    reader.Close()    

End Sub
G_Waddell 131 Posting Whiz in Training

HI,

I don't think the issue is passing the arrays, I think it is what you are doing with them...

Your nBath, nPeople, nHouse etc are all defined as single dimensioned integer arrays but for example, in your Sub routine ProcessHouse you seam to treat them as as single integer value:
lstHouse.Items.Add("House: " & nHouse & " People: " & nPeople & " Baths: " & nBath & " Income: $" & nIncome)
Instead of something like:

for i =0 to 9
lstHouse.Items.Add("House: " & nHouse(i) & "     People: " & nPeople(i) & "     Baths: " & nBath(i) & "     Income: $" & nIncome(i))
next

Even then why not just use a single multi dimensional array?

dim Details(3,9) as integer
'...

for i = 0 to ubound(Details,2)-1
    nHouse = Details(0,i)
    nBath = Details(1,i)
    nPeople = Details(2,i)
    nIncome = Details(3,i)
next

Also in your CalAvgBath function you have the line ReDim Preserve sumBath(nBath) nBath is an array of integers not an integer...

G_Waddell 131 Posting Whiz in Training

Hi All,

Two questions really:

  1. Is Windows 2003 still supported? (With all the fuss about XP support ending, I'm not sure if I missed it)

  2. We have an old Windows 2003 Small Business Server as our domain controller, Exchange server and file server which is coming to the end of it's life.

We also have a Hyper-V (not service but bare bones server) with an iSCSI connection to a NASbox for the VM disks.

I'm thinking of creating an Exchange VM and Maybe getting another NASbox to use as a file server. But I'm not sure what to do with the SBS box. From my understanding of SBS, it is supposed to function as a sole domain controller and does not play well with other domain controllers. Does this mean if I want to build a replacement SBS box or move us over to a "proper" domain controller I will have to build the new machine "off of the domain" and then swap it out? Or create a new domain?

G_Waddell 131 Posting Whiz in Training

Hi,

If you want to store and retrieve data from a database in VB.net I suggest the following:

  1. connectionstrings.com put this site in your favourites.
  2. Look at this link MSDN ADO.NET
  3. Google DATASET, DATAADAPTOR, DATAREADER, SQL
G_Waddell 131 Posting Whiz in Training

If you don't specify http:// at the start word assumes it is a filepath link...

G_Waddell 131 Posting Whiz in Training

Hi,

instead of Dim addr As String = "www.fedex.com/fedextrack/index.html?tracknumbers=" & strTID try Dim addr As String = "http://www.fedex.com/fedextrack/index.html?tracknumbers=" & strTID

G_Waddell 131 Posting Whiz in Training

Hi,

You need to store the data in a shared file or on a database. The settings are stored locally in a file on which ever machine the application is deployed on. So if you run an application for the first time on a new deployment it will create the settings file locally with whatever default values have been specified.

G_Waddell 131 Posting Whiz in Training

Hi,

What code have you done or tried so far? Can you post and we will look at it for you?

Have you a dataset populated with the two tables?
Or is it a single result set from the two tables?

You need to give more details to go on...

G_Waddell 131 Posting Whiz in Training

Hi,

Not exactly sure what it is you're asking - you want to build an interface on your application that looks like Outlook 2010?

G_Waddell 131 Posting Whiz in Training

Hi
If you are using Visual Studio 2010 or less then I've good news, you need to add a setup project to your solution and there is a setup project wizard to guide you through it. This setup project will deploy your program to the client in an executible. You should google set up and deployment in Visual Studio to find out which type of deployment project suits you.

Now for the bad news if you are using Visual Studio 2012 or 2013 Microsoft in an example of the type of stupidity they have been displaying lately have removed the setup and deployment projects from Visual Studio and now your are expected to use some third party tools - idiots, You've to develop a program for use on their operating system using their technologies but then go and get someone else to handle deployment for you.

G_Waddell 131 Posting Whiz in Training

Some operating systems (mostly older) use a 32 bit architecture and others use a 64 bit one. If you are unsure, select Any CPU on the compile options.. 64 bit architecture can make better use of memory and support a higher memory on the client machine I think a 32 bit is limited to using about 4 GB of RAM on the client (even if more is installed)

G_Waddell 131 Posting Whiz in Training

Hi,

I take it you are starting out in the world of programming. If so, you wont be asked too many questions on experience but just in case have a few examples rehearsed of any projects you worked on in your course. When answering questions of this type, always try to answer using the STAR technique:

Situation - background to the story
Task - What needed to be done
Action - What you did to resolve
Results - What was the end result

If they ask you about something you have no experience with, don't make up something just answer that you haven't encountered it but in that situation you would do...

Now the majority of the questions are likely to be technical if your starting out - if your not sure ask for clarification on what they are asking.

You should take a look at the job specification before the interview to figure out what areas they are interested in.

For example, if they say in the job spec about interacting with databases brush up on your SQL and ADO / OLEDB...

G_Waddell 131 Posting Whiz in Training

Hi,

It doesn't matter what version of Visual studio you use (for backwards compatibility,) your VB.Net project runs on the .Net framework and you can target earlier versions of the .NET framework in your project. e.g. if I select a .Net Framework version of 4.0 then as long as the OS of the computer I run it on has .Net Framework 4.0 installed then it will work. As far as I know Windows XP can have .Net 4.0 framework on it Not sure about 4.5 though. Also, note you need to watch out for 64 bit verses 32 bit (again you can select under project compile options)

G_Waddell 131 Posting Whiz in Training

Hi,

OK sorry, been busy at work.

Could you show me the code for the stored procedures?

I think you may have to modify them...

I think I have several ways of solving this but it really depends on how exactly you want this to work... which way suits best

  1. Feed the results of each proceedure into each other (if you are only looking at one item at a time this could be the way to go)

  2. If you have several items you want to display let SQL do the hard work and look at using views to generate the data.

  3. If you have several items you want to view at a time another possibility is to use a dataset and datatables with relationships to display the data. Not recommended if you are bringing back whole tables though.

  4. Something else I haven't though of yet...

G_Waddell 131 Posting Whiz in Training

Audi just came out with diesel and BMW will be coming out with on in Dec. I've seen Diesel X5 BMW was pretty sweet.

Audi and BMW have had diesels for years... I remember our old Audi 80 TD back in 1989.

G_Waddell 131 Posting Whiz in Training

KimberGariando see earlier postings mm gives minutes not month (MM)

G_Waddell 131 Posting Whiz in Training

Fair enough, As I said I was just curious and didn't mean any offense

G_Waddell 131 Posting Whiz in Training

OK lets take this slowly, to recap:
1. You want to return a value from a Stored Procedure
2. You want to assign this value to a variable that you then pass into another Stored Procedure or Select Statement

OR are we misunderstanding you?

Select Barcode, ItemCode, Get_itemCount From Product

You said Get_itemCount was the result of your first procedure can I ask what the select statement behind that procedure is? For instance, are you trying to do something like this get the barcode, itemcode and count of orders (or something similar,) from another table for each item?

If so you can do this with a select that uses a nested query:

SELECT itemcode, Barcode, ISNULL(Orders.Item_Count, 0) As Item_Count 
From Product
LEFT OUTER JOIN (
SELECT COUNT(*) As Item_Count, itemcode 
FROM OrdersTable 
GROUP BY itemcode
) As Orders ON Product.itemCode = Orders.itemcode
G_Waddell 131 Posting Whiz in Training

Hi,

No offense but your handle is Mr. Hacker and you want to hide programs from control panel etc....

I'm just slightly curious as to the purpose of this query.

G_Waddell 131 Posting Whiz in Training

Hi,

Also you need to specify that your command will use the connection...

G_Waddell 131 Posting Whiz in Training

Hi,

Try the IsNumeric to check if your input is numeric or not:

If Isnumeric(MyInput) then
    'Do something
else
    Msgbox("Non Numeric input detected")
end if
G_Waddell 131 Posting Whiz in Training

Hi,
If Diesel is more expensive where you are than petrol thats usually down to your countries tax, I'm living in Ireland and diesel is cheaper than petrol, I come from the UK though and I was aware while I lived there that the government taxed diesel at a higher rate hence it was more expense than petrol.

However, diesel cars tend to be more efficient than their petrol equivalents especially for those doing higher mileages (they also have superior torque). The snags with diesel are more frequent servicing, lower rev range (you get used to it and adapt), can be noiser (more of a roar than a petrol growl as well), vibration - not so much of an issue as was in the past.

I'd also consider LPG if I knew I could get a reliable supply (not sure where they are any LPG stocked filing stations) The LPG gives way less CO2 emissions and therefore less tax on it, the conversion can be done aftermarket on petrol cars but it's only real advantage is while LPG is so cheap. Basically the car runs on petrol until the engine reaches operating temp then switches over to LPG - there is a slight drop in horsepower and actually the MPG goes down too but because the LPG is so cheap it doesn't matter.

My car is probably a generation behind mordern diesels. e.g. BMW, Mercedes and Hyundai are three companies I can think of just now that offer a …

G_Waddell 131 Posting Whiz in Training

Hi,

Your going to have to use the process class There is an example here of starting a process (in this case notepad,) then getting it's ID and then stopping it. You'll have to do something simliar to Apache i.e get its ID then stop and start it again.

G_Waddell 131 Posting Whiz in Training
G_Waddell 131 Posting Whiz in Training

Hi,
Connectionstrings.com will allow you to check the connection string but it looks ok to me. Is con an OLEDB connection object? i.e. dim con as new OleDbConnection()

Does the Access file reside at the path specified? Is access installed on the machine?

Sorry if these questions seam basic, you haven't given me much to go on.

G_Waddell 131 Posting Whiz in Training

Hi
You call and initiate the second form, from the first forms load event:

Sub Form1_Onload ( byval sender as object, byval e as system.eventargs) Handles Form1.OnLoad
    dim NewForm as new Form2
    NewForm.Show()
    '....
End Sub

Using this technique, you can even set values of controls (or add new controls,) in the second form.

dim NewForm as new form2
'assume there is a textbox txtEntry on Form2
NewForm.txtEntry.Text ="Hello I'm on Form 2" 
NewForm.Show() 'Form2 will open with the textbox populated

You can even open the second form as a modal dialog and process results.

Dim NewForm as New Form2

If NewForm.ShowDialog = DialogResult.OK then
    'Result of OK was returned
Else
    'Other Result
end if

On your second form you would probably have a button that would set the dialog result of the form to OK provided what you wanted to happen on the form happened.

G_Waddell 131 Posting Whiz in Training

Dim myUpdateQuery As String = "Update Navire_Clients set equipage = 'Skipper' where Num = 10"
Should you not be changing this update query dynamically? Basically you have hardcoded in that the same record(s) will be updated I would expect to see something like this:
Dim myUpdateQuery As String = "Update Navire_Clients set equipage = '" &equipageValue &"' where Num = " &NumValue

Or if you are using parameters this:
Dim myUpdateQuery As String = "Update Navire_Clients set equipage = @equipage where Num = @Num"