G_Waddell 131 Posting Whiz in Training

I think you will have to try passing Javascript code in with your HTML stream and do it that way.

G_Waddell 131 Posting Whiz in Training

I'm not 100% sure you are actually using Internet Explorer but anyway I doubt you can change it to use Chrome.

You would more likely suceed in opening an instance of Chrome on the desktop and passing a URL into it.

G_Waddell 131 Posting Whiz in Training

Mark as solved....

G_Waddell 131 Posting Whiz in Training

Hi,

Can you post some of the code and we will see what is happening? Off the top of my head , you could try a SELECT DISTINCT query to get rid of repeating values - it depends on what your DB structure is if you should be getting them or not.

G_Waddell 131 Posting Whiz in Training

See my reply on the other post - get back into that lab ASAP and back on to the same machine and ensure it was actually saved to the folder and not somewhere else

G_Waddell 131 Posting Whiz in Training

Should he post to VB.net? It doesn't sound like something peculiar to .Net - it could be any program...

G_Waddell 131 Posting Whiz in Training

I think that JorgeM has found what was missing.....

G_Waddell 131 Posting Whiz in Training

SELECT DISTINCT Fname as Name From MyTable
UNION
SELECT DISTINCT MName AS Name FROM MyTable
UNION
SELECT DISTINCT LName As Name FROM MyTable

G_Waddell 131 Posting Whiz in Training

No sure what you are trying to do, do you what a result that lists each first name then each second name used by the first name then each last name used by the combination of both or do you just want a list of distinct Firstnames, Middlenames, lastnames in no particular order?

G_Waddell 131 Posting Whiz in Training

Type this into google "Joining tables in a SQL query"

G_Waddell 131 Posting Whiz in Training

Oh No!

  1. You may not have not actually saved your solution to your pen drive - a pen drive mounts itself on to a computer to the first available drive letter so for example it may have been your F: drive at home but when you got onto the colllege machine it could have been another drive letter - although you opened the project from the drive so it is unlikely this is the case
  2. The computer may have been writing to the pen drive when you disconnected - did you "safely remove the drive"?
  3. College networks are well known for virus activity - do you have an anti virus solution at your college? that is kept up to date - do you have one at home?

I'm afraid unles you can quickly get back to that lab and that computer you may have lost your work - If ou can try the open project menu and hopefully the project will be listed in the last few opened projects the if you are lucky, you may be able to open and resave to your pen drive.

JorgeM commented: good point! +6
G_Waddell 131 Posting Whiz in Training

Hmmm...
Tricky to answer with out a crystal ball! How long will your Masters course last? Who can predict what the big growth sectors will be? Remember the .Com bubble and burst?

I'd say go what interests you first - If you are interested in it you will become good at it and you will always find a job in it even though it may not necessarily be in high demand... As long as it is current that is.

If your course is only a year then one good way could be to look at what jobs are on offer now but any longer and the way things are going out there who knows if there will be the jobs in that sector? Or if there will be a mad rush to by students to skill up in it and then it ends up with more candidates than jobs...

So maybe try and look at what will still be around no matter what and what gives you an opportunity to cross train into other sectors no mattter what happens.

I'd say for the foreseeable future there will always be jobs in the following:

Software Engineering / Programming - not necessarily with purely IT / computer companies either i.e. I've worked for Engineering firms, Pharma firms and Financial Services Firms all programming customised software for them.

Database - most systems run off of databases be it stored locally, in remote servers via a WAN/LAN or in the cloud Databases are …

G_Waddell 131 Posting Whiz in Training

Hi,
I take it this is on an Intranet site. If not, you should look at using other methods of authentication for security reasons.

Anyway now that is out of the way, are you sure the user is acessing the site as their own account and not the IGuest user of the web server?

Check the Authentication method of the Site on the server. It depends on which version of IIS you are using where it is but, if anonymous access is enabled and other forms of authentication are disabled then the user will be logging into the site as the webservers iGuest user which is a user local to the web server and not a domain user.

Also, check that the Application pool being used by the site loads the user profile and doesn't run as a particular user (again depands on the version of IIS you are running how you do this.)

If this is happening during a debug / step through then I think by default it should authenticate you automatically (although, bear in mind the above when you do deploy to live site, ) in which case you need to to look at your authentication methods in the config file which I'm a bit rusty on, (I haven't built a web site from scratch since last December,) check the user is actually authenticating under their domain account may be by returning the account name in a message box or something.

G_Waddell 131 Posting Whiz in Training

I'd start by creating a new table to hold the reciepts...

G_Waddell 131 Posting Whiz in Training

Well, Everything is up in the air just now as we are looking at switching ISP from DSL to a wireless provider.

Basically, our current ISP is the old national Telco carrier and the performance is intorrible .e.g. I have spent all day today applying Windows updates to a new Windows 2008 R2 server. They are blaming the local exchange and saying it is a previous generation that is not due for upgrade yet.

Given that if we switched to another ISP with DSL (we would hit the same issue as it would go through same exchange,) We have been looking at Wireless (looked at a fibre providered but no cables near by)

So, there is no point in doing anything for the time being until we get our new provider and discuss with them...

G_Waddell 131 Posting Whiz in Training

adam K you were right....

G_Waddell 131 Posting Whiz in Training

Hi
I have a real conumdrum here - I just can't expalin this behaviour!!

A colleague has designed a view that contains the following : CONVERT (nvarchar(4),YEAR(dbo.SYSFinancialYear.FinancialYearStartDate)) + N'/' + RIGHT ('00' + RTRIM(CONVERT (nvarchar(2), dbo.SYSAccountingPeriod.PeriodNumber)), 2) As YearPeriod

When you are in the design view, of the view and execute you get the value 2011/10 for a particular record which is what we would expect. However if you use the view inside another view or open a query window and run a select statement on the view then for the same record the value changes to 2012/10 If you open the view directly, the value changes back to 2011/10 We've checked and there are no duplicate records or records where the value should be 2012 for this row. The view is returning the value as an nvarchar.

G_Waddell 131 Posting Whiz in Training

They want to put the date value from one with the Time value of the other i.e.

04/05/2012 12:08
03/05/2012 15:30

= 04/05/2012 15:30

As for why? Why not?

G_Waddell 131 Posting Whiz in Training

Sorry I thought you wanted to join the two values in a separate string i.e. "03/05/2012 04/05/2012" this is not a date value, I've reread and realised what your up to - Reverend Jim is quite correct...

G_Waddell 131 Posting Whiz in Training

Thanks,
It's good to know I at least heading in the right direction.... I'll see what we can do when the new router arrives

G_Waddell 131 Posting Whiz in Training

I'd try looking at the date format, I always try to pass date values into my databases as YYYY-MM-DD (2012-05-03) or DD-MMM-YYYY (03-May-2012) formats to avoid confusion with the U.S. (wrong) date format and the civilised one ;-) i.e. mm/dd/yyyy (05/03/2012) vs dd/mm/yyyy (03/05/2012)

dim formatedDate as string 

....
formatedDate = Year(DateTimePicker1.Value) &"-" &Format(Month(DateTimePicker1.Value),"0#") &"-" &format(Day(DateTimePicker1.Value),"0#")
....

Save.Parameters.AddWithValue("@p5", formatedDate)
....

Also you are using DateTimePicker1.Text. You should use DateTimePicker1.Value

G_Waddell 131 Posting Whiz in Training

Why not post your code? It will be easier to identify where you are going wrong...

G_Waddell 131 Posting Whiz in Training

Hi
if you want to concatinate two values as a single string, then you're half way there. next step is in the Database to configure the field to be a char or varchar field ( or equivalent depending on Database) and simply pass textbox1.Text in as a string.

G_Waddell 131 Posting Whiz in Training

Hi,
Sorry for taking a while to reply - been busy with other things.

Maybe I didn't make this too clear on my initial postings.

Our ISP router which seams to be configured as a bridge has 4 ports.

Our existing Firewall has two ports (one into the ISP Router, one into our Network Switch to connect to our LAN) It is set as our LAN gateway on Our Windows 2003 Small Business server Domain Controller.

I wanted to take the second router and plug it into one of the three spare ports on the ISP router to create a seperate private network that would share the ISP connection through their router. It would not be plugged into our LAN switch and would be outside of our existing firewall - the router I found earlier appears to have it's own buit in firewall.

I thought if I configured the new router with the same ISP details as are on our firewall, that because they are going throught the same router they could share the ISP account ( Is this not the case?)

I could then put our Wireless Router into the new second private network behind the new router which would be the Wireless Routers Gateway server, and I would set the Wireless Router to have a static IP in this network and enable it's built in DHCP service for connecting devices.

Thus our wireless network would share the ISP but traffic from our wireless network would be treated …

G_Waddell 131 Posting Whiz in Training

Should your code not be something like subtractequals.Text = Val(subtract1.text) - Val(subtract2.Text)? Instead of subtractequals.Text = Val(subtract1.text) - (subtract2.Text)? In otherwords, you are telling the code the first textbox text is a numeric value and then are subtracting the second textbox text (which is a string...)

G_Waddell 131 Posting Whiz in Training

Hi,

A couple of ways, try this for starters:

dim DR as SQLDataReader
dim cmd as SQLCommand

cmd = New SqlCommand("SELECT Column FROM table", DBconnection)
DBconnection.Open()
DR = cmd.ExecuteReader()
If DR.HasRows Then
        Do While DR.Read()
            MyComboBox.Items.Add(DR.GetString(0))
        Loop

end if
DR.Close()
G_Waddell 131 Posting Whiz in Training

Hi,
I'm probably missing something really simple or trying too much at once but it's 16:30 on a Friday afternoon and my head is wrecked!!

Basically, I'm trying to build an application that takes out put from a database query as XML and uses XSL to transform it into HTML which is then displayed in a web browser controll on another form.

I thought I break it up into pieces so I decided to just create an XML file and an XSL stylesheet and read this into the web browser control but all I'm getting is <HTML></HTML> !!

Here is my code:

Dim frmViewer As New frmProcessReportViewer 'New Form'

'Create an XMLCompiledTransform object and load the XSL stylesheet.' 
Dim doc As XPathDocument = New XPathDocument("CDCollection.Xml")
Dim Transform As XslCompiledTransform = New XslCompiledTransform
Dim Settings As XsltSettings = New XsltSettings
Settings.EnableScript = True
Transform.Load("CD.xsl", Settings, Nothing)

'need a stream to put it all into'
Dim HTMLStream As New MemoryStream()
Dim StreamWriter As New StreamWriter(HTMLStream, Encoding.Default)

'Place HTML into our StreamWriter'
Transform.Transform(doc, Nothing, StreamWriter)
'Populate the Stream
StreamWriter.Flush()

'Set the WebBrowser.DocumentStream = HTML stream'
'Remember to "AllowNavigation" in Browser otherwise the thing doesn't work.'
frmViewer.WebBrowser1.AllowNavigation = True
frmViewer.WebBrowser1.DocumentStream = HTMLStream

'wait until finished'
Application.DoEvents()

'show as a modal'
frmViewer.ShowDialog()

Anyone tried anything like this before? Our eventual aim to to be able to produce reports in our application form the database without having to use Crystal etc.

G_Waddell 131 Posting Whiz in Training

Hi,

Yes it is the setup of the ISP router that keeps confusing me - At present, it has the DSL phone line going into it and then our firewall connected into one of it's 4 ethernet ports. It has a wireless capability but seams to have been configured either by the ISP or someone else in the past as a bridge?? i.e. it does not have the wireless enabled and the firewall seams to be logging into the ISP with the ISP account.

So basically what I should be doing then is putting a router behind the firewall to split the network into two seperate VLANS one for the wireless and one for the wired that do not communicate / share data with each other.

I was looking at the HP V100 5 port router part no JE454B, Click Here It has a firewall and claims to allow multiple users to share a single Internet connection.

G_Waddell 131 Posting Whiz in Training

I think you are looking for a more complex answer than it really is, think of the Internet as a highway.

Generally at 5 am there are very few cars (data packets?) travelling down it and traffic flows freely where as at 5pm, there are more cars and the traffic slows.

The reason I say generally is because there are factors other than volume that can affect the flow too - using our highway example road works and road conditions, localised events etc.

There are equivalents of this on the Internet, for example when there is a concert or sports event local traffic slows down due to volume - Not all the highway is affected, but traffic in that area. A scenairo like this could occur around a particular companies website for example Apple annouce the launch of a new iPhone the Apple site becomes slow to respond because of all the traffic around it but other sites will be fine....

A large company using a web farm to host their website takes down a few of the farmed servers for maintenance, less access to site = slow down....

You're using a truck or bus (3G on your phone, Dial up) to get to your destination instead of a sports car (DSL etc)

G_Waddell 131 Posting Whiz in Training

Hi
For Question #1 don't forget to include the points at the other end i.e. do you want floor mounted sockets? or Wall mounted? Where do you want them in relation to each desk? how many sockets should each person get? E.g. one point for data and another for the phone or a single socket?

G_Waddell 131 Posting Whiz in Training

Sorry I was trying to do out a diagram of the proposed set up but it got a bit mangled...

Really what I want to do is set up two seperate networks with a shared internet link.

G_Waddell 131 Posting Whiz in Training

Hi,

I'm a developer by trade but I've done some networking in the past (mostly buying and creating machine specifications but also a bit of firewall management and AD policies,) In a previous company I was even Manager of the Systems department (Developers and IT guys)

Anyway I've recently joined a small ( 6 person,) company and so it is upto everyone to do what they can. Currently we have a wired Windows AD network with a 2003 SBE server as the Domain controller.

We all have smart phones that the company pays the bill for and because we spend time out on site, they are all configured to read off of our Exchange server. Trouble is that they are running up big bills with the 3G data. So one of our directors (my boss,) wants me to see if I can set up a secure wireless network to give the smart phones internet access when they are in the office so that they wont use their 3G to get data. It is only to provide Internet access not direct access to our network and as such if we can have it as a seperate network but sharing our internet connection that would be great.

There is a wireless DSL router coming in from our ISP (which seams to have been reconfigured as a bridge,) with four ports in the back connected to a Zyxel firewall which is in turn connected to our network. The firewall settings on the ISP …

branko.gajic2 commented: acer amdathlon(tm)64_2 +0
G_Waddell 131 Posting Whiz in Training

Hi
The problem is it's not the generic datagrid but a special Sage one!

If I go into debug mode and do a watch on Grid.datasource I can see there are three items of type Sage.Accounting.TraceableSOPAllocationItem (Sorry, I wrote this down wrong last time,) if I try to loop through them I get the error I mentioned earlier.

I can also access the Items in the grid more directly as Listitems the problem there is I can only really get the data that is visible on the Grid:

For Each lItem As ListItem In ItemGrid.Items
    sBatchno = lItem.SubItems(1).Text
    sBinName = lItem.SubItems(2).Text
Next

I tried to tap into the listitem datasource (AllocatedItem = lItem.Datasource) but the code went into some sort of infinite loop!??? and collapsed out. Although if I do a watch on lItem.Datasource I can see it being returned as Sage.Accounting.TraceableSOPAllocationItem type. I played around somemore with the watch and found I could get to the actual thing I wanted Sage.Accounting.StockItem if I did lItem.Datasource.StockItem but if I try:

dim oStockItem = Sage.Accounting.StockItem
For Each lItem As ListItem In ItemGrid.Items
    sBatchno = lItem.SubItems(1).Text
    sBinName = lItem.SubItems(2).Text
    oStockItem = lItem.Datasource.StockItem 
Next

I get another invalid cast error... In the end, I had to use the following:

 For Each lItem As ListItem In ItemGrid.Items
    sBatchno = lItem.SubItems(1).Text
    sBinName = lItem.SubItems(2).Text
    dim oObject as new Object  = lItem.Datasource.StockItem 
    sStockID =  oObject.PrimaryKey.Value.ToString
Next

I'm starting to wonder if there is a problem with the program dll's though because …

G_Waddell 131 Posting Whiz in Training

Hi
If Sortedlist doesn't work for you you can also try a DataTable. A DataTable has a DefaultView property, which is a DataView for the table and a DataView has a Sort property which allows you to sort your data by any column in either direction e.g. "PlayerPoints Desc"

G_Waddell 131 Posting Whiz in Training

Hi,

Yes you are right, the datasource will be made up of TraceableSOPAllocationItems
The TraceableSOPAllocationItems contain properties some of which the grid displays, just not the one I'm looking for but it is held in the TraceableSOPAllocatedItem object

G_Waddell 131 Posting Whiz in Training

Hi
I use the SubversionEdge Kit from Collab net it sets up the Server for you, running through apache. BUT They also over the CollabNet Desktop for Subversion and ANKH SVN. I think this is what you are actually looking for, the desktop will let you connect to your subversion server via the desktop then ANKH SVN is a plugin that goes direct into any version of Visual Studio and runs off the desktop to enable you to manage and check your files in and out of your respository as you would of via Source Safe except of course , it allows branching , concurrent development etc. http://www.collab.net I'm sure there other tools out there that let you do this but it's what we use.

G_Waddell 131 Posting Whiz in Training

Hi All,

I know this may seam odd but I'm getting an error navigating through a datagrid of an invalid cast. The trouble is it is of the same types!! I working on customising some Sage code and in the form there is a datagrid that is populated by a series of Sage.Accounting.Stock.TraceableSOPAllocationItems (a batched stock item allocated to an SOP).

I want to give the user some further information on each item so they can decide which batch and bin to use. I want to go through each item in the grid and then go find this extra information for it. the trouble is when I go to navigate through, My VB.Net code throws the error

InvalidCastException was unhandled by user code, Unable to cast object of type 'Sage.Accounting.Stock.TraceableSOPAllocationItem' to type 'Sage.Accounting.Stock.TraceableSOPAllocationItem'.

There shouldn't be a cast going on here they are of the same type???? Here is a snipet of my code:

dim AllocatedItem As Sage.Accounting.Stock.TraceableSOPAllocationItem
if itemGrid.Datasource isnot Nothing then
    for each AllocatedItem in itemGrid.Datasource
    ......
    next
end if

The error happens when I start looping....

Any ideas would be much appreciated..

G_Waddell 131 Posting Whiz in Training

I agree you must be entering the wrong syntax...

e.g. I want to find the difference between date1 and date2 in days,
datediff( day, date1, date2)

I want to know the difference in Hours datediff( hour, date1, date2)

G_Waddell 131 Posting Whiz in Training

Hi,

Sorry for the delay, you either want to use the register on submit statement or alternatively, if you are checking something like form input etc you can create a client side function that returns true or false, register in with Client script block and on the button attributes call the function on the client side click if the function return a false, the submission will stop if true it will go ahead and execute the submission.

G_Waddell 131 Posting Whiz in Training

Hi,

I've kind of solved it, I just don't filter for anything....

Dt = conn.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Columns,Nothing)
G_Waddell 131 Posting Whiz in Training

Hi,

I'm writing a routine to import salesorders from an Excel sheet into Sage. The Sheet is broken down by product rather than by order so I want to use OLEDB to connect and run a query against it sorting by Order Number to get the items back per order.

The issue I have is that I want to check that there is a valid worksheet in the Excel Document before proceeding. I plan in looping through the spreadsheets and check the columns in each one to ensure they are in a valid format.

In order to do this I was planning on using GetOleDbSchemaTable but I don't get any tables back... The test workbook I'm using has three sheeets in it and sheet 1 is valid.
Here is a sample of my code:

'connstr passed into function
dim conn as new data.OleDb.OleDbConnection(ConnStr)
dim Dt as datatable
conn.open()
Dt = conn.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Columns, New Object() {Nothing, Nothing, Nothing, "TABLE"})
IF DT.rows.count = 0 then 'always has rows.count =0
'process each table
end if

Why do I never get any rows? i think I may be getting the GetOleDbSchemaTable wrong but every example I've seen it looks ok.

G_Waddell 131 Posting Whiz in Training

Hi
This link should help you http://msdn.microsoft.com/en-us/library/ms178207.aspx

It really depends when you want the script to run, In response to an event or automatically after the page loads?


Your code looks like you are trying to do both with the same script....

The RegisterStartupScript creates a Script block at the bottom of the page to run immediately after a page load.

The RegisterClientScriptBlock creates a script block at the top of the page to handle a client side event or be fired by another client side script

The RegisterOnSubmit Statement adds a block that is fired when you page submits i.e. on postback.

Also you have given the two script blocks the same name! How does the page know which to call?

G_Waddell 131 Posting Whiz in Training

You have not populated the dataset so there are no tables in dsStudent.This is why you are getting an error tryng to use a table that does not exist. You must populate your dataset before using it.

You need to use an OLEDb Data adapter to populate your dataset.

G_Waddell 131 Posting Whiz in Training

Hi

Why go to the bother of processing in a Vb DLL? Why not on form submission apply your checks on the client side and then divert to the page accordingly this will save you a round trip to the server and be alot faster or maybe I'm missing something here in your purpose for doing this?

G_Waddell 131 Posting Whiz in Training

Hi,
I'd say you would have to contact the company directly. It would be a very silly security company that let random people encode and decode their security cards - they'd be giving you the keys to the kingdom!

G_Waddell 131 Posting Whiz in Training

What is dsStudent, I assume it is a dataset but I cant see you initialising it or declaring it. I se you opening a connection string then suddenly you're setting datatables....

G_Waddell 131 Posting Whiz in Training

Windows Task Manager

Get it to run your code / app at the time of day you need. Else you will have to design something in the app which would need to be running all the time to trigger at the right time.

G_Waddell 131 Posting Whiz in Training

Hi
I've never done this but I'd suggest (if it is a viable option for you,) looking into importing the RTF into a Word object then you can access print dialog etc thorugh word and it should also automatically format the text for you.

G_Waddell 131 Posting Whiz in Training

Glad to have helped!

G_Waddell 131 Posting Whiz in Training