lolafuertes 145 Master Poster

I've been using the Grapecity Farpoint (http://www.fpoint.com/default.aspx) for many years

Hope this helps

lolafuertes 145 Master Poster

If you put your code here, maybe we can help you to find where is the problem.

Anyway, if you use a data adapter, probably you miss to define the insert, delete and update commands for it, and/or miss to call it for update.

Hope this helps

lolafuertes 145 Master Poster

In order to quicly free resources, I would prefer to fill some table in a memory dataset, then close and dispose the connection to the server (freeing resources). after that you can cicle over the data in memory.

Between fills, give some time to the system calling the System.Threading.Thread.Sleep for 50 miliseconds.

Hope this helps.

lolafuertes 145 Master Poster

Maybe you need to verify the CPU / BIOS version with http://www.intel.com/support/sp/processors/tools/frequencyid/

On http://support.microsoft.com/kb/842465 you have a step by step on how to determine if the processor is the problem.

Hope this helps

lolafuertes 145 Master Poster

I think that if you impersonate your application with a user other that the logged in, with enough privileges (like Administrator) your Excel will be exclusive.

See http://blogs.msdn.com/b/shawnfa/archive/0001/01/01/400749.aspx on how to.

Hope this helps

lolafuertes 145 Master Poster

Most AD administrator use the 'logon script' to execute some programs when the user logs into the machine.

http://technet.microsoft.com/en-us/library/cc758918(WS.10).aspx

While this article points to Windows server 2003, is still valid for 2008 or 2000.

Hope this helps

lolafuertes 145 Master Poster

Assumming the input for the elbonian date is a textbox1 you can:
a) split the input into 3 parts by "-" as separator
b) Verify that the year has 4 digits including century. this is needed for the next steep
c) Create an string in format of yyyy-MM-dd ( called also universal format), convet it to date-time and convert the result to long date string
d) Put the resulting date in your output control assuming label1
IE:

Dim dateParts as string() = textbox1.Text.Split("-"c)
If dateParts(1).Length = 2 Then dateParts(1) = "20" & dateParts(1)
Dim resultingDate as String = Ctype(dateParts(1) & "-" & dasteParts(2) & "-" & dateParts(0), DateTime).ToLongDateString
label1.Text = resultingDate

Hope this helps

lolafuertes 145 Master Poster

Is not ususal to have those large 'wait times' for insert.

Many things can happen.

I've got this problem on a machine that has a raid 5 disk failing and a bad sector in another disk of the raid5, so, when trying to write in the disk it took more than 45 minutes for an insert, and most of the times failed just with a time overflow message.

Another possible issue is that your machine is low in memory (using more memory than the phisical) and has heavy swapping to disk. In this case you should increase your (machine) memory.

I detected this kind of problems also in a multiuser or multithreading environment when a dead-lock happens.

I know that those comments are not a solution but I hope this helps.

lolafuertes 145 Master Poster

ADO is part of the Visual Studio runtime and you don't need to buy it separately

Hope this helps

lolafuertes 145 Master Poster

Ok.
The error generated by GetFiles, comes from a folder that you do not have enough privileges to read all the contents.

In the exception, you have the offending folder (ie: on Vista, "Access to the path 'C:\Documents and Settings' is denied".)

As this can happen in many others folders, I would suggest not to get all the file names in the drive with only one sentence.

Moreover, if you count the files and folder in the drive, you can get a lot of thousands, so this can be unmanageable in a listbox.

Hope this helps

lolafuertes 145 Master Poster

Just curious, do you use "D:\\" or D:\" to access to the root directory of drive?

lolafuertes 145 Master Poster

maybe you can try to change your query to some thing like:

select MAX(payrolldate) AS [payrolldate], 
dateadd(dd, 7 - DATEPART(weekday,MAX(payrolldate)), MAX(payrolldate)) AS [Sunday] 
from payroll where payrollran = 'no'

The hint here is that datepart returns the week day(1 to 7). The return value depends on the value that is set by using SET DATEFIRST. I use 1 (monday) as first day of week so Sunday is 7.

If you use another first day of week, then you must change the query according.

Hope this helps

lolafuertes 145 Master Poster

Of Course you can load it using some thing like:

For RowNum as Integer = 0 to ds.Tables(0).Rows.Count -1
    Dim CurrRow as DataRow = ds.Tables(0).Rows(RowNum)
    '
    ' Assuming the data Grid View has enough rows
    '
    DataGridView1.Rows(RowNum).Cells("column1").Value = Currrow("column1").Value
    DataGridView1.Rows(RowNum).Cells("column11").Value = Currrow("column11").Value
    
    . etc

Next

Hope this helps

lolafuertes 145 Master Poster

Instead of

grdAccountTypes(0, grdAccountTypes.Rows.Count() - 1).Selected = True

try

grdAccountTypes(0, 0).Selected = True


Hope this helps

lolafuertes 145 Master Poster

You need to split the functionality in grdScroll like:

Public Sub grdScroll(ByVal sender As Object, ByVal e As System.Windows.Forms.ScrollEventArgs)
        Dim RowIndex As Integer = grdAccountTypes.CurrentRow.Index + e.NewValue
        SelectNewRow(RowIndex)
    End Sub

Public Sub SelectNewRow(Byval RowIndex as Integer)
    If grdAccountTypes.RowCount = 0 Then  ' if no row exist right now
            MessageBox.Show("No row existed right now. Please add some records")
    Else
        If RowIndex >= grdAccountTypes.Rows.Count() - 1 Then
            grdAccountTypes(0, 0).Selected = True
        ElseIf RowIndes < 0 then
            grdAccountTypes(0, grdAccountTypes.Rows.Count() - 1).Selected = True           
        Else
            grdAccountTypes(0, RowIndex).Selected = True
        End If
    End If
End Sub

Then you can modify the grdMouseWheel to act as:

Dim RowIndex As Integer = grdAccountTypes.CurrentRow.Index
        If e.Delta < 0 Then
            RowIndex -=1
        ElseIf e.delta > 0
            RowIndex +=1
        End If
        SelectNewRow(RowIndex)

Hope this helps

lolafuertes 145 Master Poster

The target machines are in an Acive directory environment or in a workgroup?
If they are in an active directory, the you can automate the execution of the scrip via Group Policy for the login script, Creating an active directory group with the machines to execute the script, and setting this group as the Group Policy target group.

You can set that the the script results are written in a file over a predefined shared in the network. The naming of the file can be based on the machinename and executiondate and time.

If the machines are in a workgroup instead, using remote shell can help, but you need to know the remote username and password having enough privileges to execute the script.

Hope this helps

lolafuertes 145 Master Poster

The MSDN_AA license terms on http://msdn.microsoft.com/en-us/academic/bb250622.aspx are explicit:

[PartQuote]You may use the software for non-commercial purposes including instructional use, research and/or design, and development and testing of projects for class assignments, tests, or personal projects. You may not use MSDNAA software for any for-profit software development.[/PartQuote]

So the answer to your question is yes, you 'must' buy it in order to sell your application.

Hope this helps

lolafuertes 145 Master Poster

Do you verified your system is virus free?
Do you have the firewall active?
Is there any parental control setup at browser level or antivirus?
Do you setup addresses on the forbidden/unsecure internt zone?
Do you have a 'host' file with tampered adresses in your %windir%System32\drivers\etc folder?
Do you have any additional browser bar installed?
Do you use a blank page to start your browser?
Do you have any 'peer to peer' download program running like eMule, Ares, BitTorrent, FlahGet, FlashGot, Kzaa, JDownloader, etc...?
Did you unistalled /reinstalled your lan card? Did you played with the lan card configuration?
Do have your router any filtering?
Did you tested your PC on another broadband connection?

There are many possibilities for your simptoms, but I hope this helps.

lolafuertes 145 Master Poster

I would recommend not to hard write user names or passwords in your code, because if they change, you'll need to recompile your code. Instead get/save them from/to an external file or DB.

I also would recommend to encrypt this information.

I would also remember you that in order to know the name of who is the current logged user you can use the System.Environment.Username.

Hope this helps.

lolafuertes 145 Master Poster

Maybe you can use some Virtualization using VMware or any other, and install a Virtual copy of the OS having a virtually higher resolution. I am not really sure if your laptop, and your card/monitor, will support that.

If I remember well, Microsoft requires at least a resolution of 800*600 to run their OS (exept in safe mode that runs at 640*480) so from a 'technical' point of view your laptop is OK.

I always recommend to have higher resolution screens.

Hope this helps

lolafuertes 145 Master Poster

On the where clause of the select statement you can write some thing like.

WHERE name LIKE 'F*'

Hope this helps

lolafuertes 145 Master Poster

Maybe you can extent your array to place the Integer.MaxValue as the last element in the intPoint array and an extra element int the strgrades for those values.

Hope this helps

lolafuertes 145 Master Poster

I suggest to change your loop a little bit to find when the suplied value is less than the upper limit of the segment:

Do Until intSubScript = intPoints.Length _
OrElse intSearchForPoints < intPoints(intSubScript)
intSubScript = intSubScript + 1
Loop

Then to obtain the 'previous' grade

If intSubScript <=  intPoints.Length Then
lblGrade.Text = strGrades(intSubScript  - 1 ).ToString

Hope this helps

lolafuertes 145 Master Poster

Usually to create the code you are trying to sell you used Visula studio /Visual Basic to develop it.

Do you own a demo/free version of Visual Strudio/Visual Basic or you brought it somewhere?

lolafuertes 145 Master Poster

IMO, maybe enough to put paper sized A5 (for half) or A6 (quarter) and configure this the default paper size on the printer.

Hope this helps

lolafuertes 145 Master Poster

Or just put the image in the .Image property of the button and clean the .text.

Resize the button to the image size.

Hope this helps

lolafuertes 145 Master Poster

Is it possible to create a new connection once the current is lost? If so, catch the exection event, close the current and try a new connection.

Hope this helps.

lolafuertes 145 Master Poster

Just wondering if you cann add an external monitor with higer resolution

lolafuertes 145 Master Poster

Please verify if:
1) Your router is DHCP enabled
2) You need a password to connect to the router
3) Your wireless connection manager in your computer is the one supplied with Vista, not the one supplied by the wireless card manufacturer

Hope this helps

lolafuertes 145 Master Poster

Thanks for your feedback.

lolafuertes 145 Master Poster

Many thinks can happen:
1) the cable has been softly broken so, depending on the cable position teh link is broken
2) the port on the computer lan card is configured to a distinct rate, protocol, recovery errors, or any of a lot of parameters possible, than the port on the router.
3) The lan card on the computer has benn broken
4) The port on the router has been broken
5) The cable goes near a generator of electromagnetism and is not folded or shielded
6) ....

The only cheap way to solve the issue is replacing one thing and testing, then, if fails, change one other thing and test again until a solution is found.

Hope this helps

lolafuertes 145 Master Poster

First on MY solution you need to define Dim split() As String

Second, the function split analizes the input string searching for the characters defined as separators and puts every piece between two separators as a new word, returning an array of words. The separator characters are stripped from the wirds returned.

On words.Split({"."c, "'"c, ","c}) you can add as many character you want to remove, so you can modify it to words.Split({"."c, "'"c, ","c, "."c, ":"c, ";"c, "&"c}).

Please note that the parenthesis and the brackets are both required.

To open the file and read the data you can:

Dim ReadBuffer as String = System.IO.File.ReadAllText("C:\SourceFolder\sourceFile.txt")

The While Words include only characters(letters, If words include punctuation Remove punctuation is enought to

Split = words.Split({"."c, "'"c, ","c, "."c, ":"c, ";"c, "&"c}).

To show each word and their length and also to print the number of words found you can, assumming you already created the stream of type text wirter as Wri

Dim NumberOfWordsFound as Integer = 0
For Each Word As String In W
If Word.Length > 0 Then
NumberOfWordsFound +=1
Wri.WriteLine(Word & " is length " & Word.Length.ToString)
End If
Next
Wri.WriteLine("Total number of words found = " & umberOfWordsFound.ToString
Wri.close

Hope this helps

lolafuertes 145 Master Poster

In this case, you need:
1) to save the file in a temporary file,
2) set the image to nothing so will release the source file,
3) wait for some miliseconds to give time to the OS to release the handler,
4) then delete the old file and
5) rename the temp to the right name.

Hope this helps

lolafuertes 145 Master Poster

In VB you can:
1) Read the entire file into an string like
Dim ReadBuffer as String = System.IO.File.ReadAllText("C:\SourceFolder\sourceFile.txt")

2) Split the string into words using the split function like
Dim W As String() = B.Split({" "c, "."c, ","c})
Maybe you need to pass more separators between the brackets

3)Create an append text stream writer like
Dim Wri As System.IO.StreamWriter = System.IO.File.AppendText("C:\DestinationFolder\DestinationFile.txt")

4) Loop to write into the destination file like

For Each Word As String In W
    If Word.Length > 0 Then
        Wri.WriteLine(Word & " is length " & Word.Length.ToString)
    End If
Next

Hope this helps

lolafuertes 145 Master Poster

This event is fired 'only' when the contents of a cell need to be formatted for display. If not, the is not fired.

see on http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellformatting.aspx the conditions under is fired.

Maybe you need to reformat your code to set the cell style backcolor just after filling the datagridview.

Hope this helps

lolafuertes 145 Master Poster

Yes

lolafuertes 145 Master Poster

I would test if adding a FormattingApplied to true is enough:

Private Sub dataGridView1_CellFormatting(ByVal sender As Object, ByVal e As DataGridViewCellFormattingEventArgs) Handles DataGridView1.CellFormatting


        If Me.DataGridView1.Columns(e.ColumnIndex).Name = "Due Date" Then

            If e.Value IsNot Nothing Then
                Dim dgvdate As String = e.Value.ToString
                ' MsgBox(dgvdate)
                If dgvdate = "5" Then
                    e.CellStyle.ForeColor = Color.Red
                Else
                    e.CellStyle.ForeColor = Color.Green
                End If
                e.FormattingApplied = True
            End If
        End If
    End Sub

Maybe you'll need to also format the value manually.

Hope this helps

lolafuertes 145 Master Poster

Can you put the piece of code and signal the line where you get the error?

lolafuertes 145 Master Poster

Maybe you need to do some changes:

1) In the patientTreatments table, be sure to include a PatiendId field in order to identify the treatements by patien Id. (this field is not shown in your coding). From now on, I'll assume that PatienId is numeric.

2) On the load_list() sub, validate that the user has entered something in the txtPatienId.text textbox and add a WHERE clause to the select statements to load only those corresponding to this Patiend Id.

rs.Open("Select  *  from  patientTreatments WHERE PatientID = " & txtPatientId.Text, con, 1, 2)

3) I will remove the btncalculate and include the logic of calculating the total on the load_list() sub, replacing the loop of reading records by something like:

Dim intcount As Integer
        Dim Total As Decimal = 0D
        While Not rs1.EOF
            ListView1.Items.Add(Trim(rs1.Fields(0).Value)) 'col no. 1
            ListView1.Items(CInt(intcount)).SubItems.Add(Trim(rs1.Fields(1).Value))
            ListView1.Items(CInt(intcount)).SubItems.Add(Trim(rs1.Fields(2).Value))
            ListView1.Items(CInt(intcount)).SubItems.Add(Trim(rs1.Fields(3).Value))
            ListView1.Items(CInt(intcount)).SubItems.Add(Trim(rs1.Fields(4).Value))
            ListView1.Items(CInt(intcount)).SubItems.Add(Trim(rs1.Fields(5).Value))
            intcount = intcount + 1
            Total += Ctype(rs1.Fields(1).value, Decimal) * Ctype(rs1.Fields(3).value,Decimal)
            rs1.MoveNext()
        End While
        txtTotal.Text = Total.ToString

4) On the btnAdd_Click, be sure to include the patient Id field while inserting.

I suppouse that you aready have a medicaltreatement_close sub, handling the Me.Close event where you will close the connection to the db.

Hope this helps

lolafuertes 145 Master Poster

I use 5 CISCO 1131 AG since 2 years ago running 24/7 with no problems.
They are configured to use IPSEC and Radius, and to exchange keys every few seconds to encript the WiFi transmission because security is a must.

lolafuertes 145 Master Poster

Can you post your LAN card hardware configuration?

lolafuertes 145 Master Poster

The * came because the pinged address does not answers to the ECHO command.
This way, many routers or destination addresses are hidden and reduce the exposition to a DOS attack.

By IP design, when you reply to an ECHO, you 'shoud' receive an AK as the ECHO originator has received your answer. If not, after a short time, you must retry your message until a defined number of not responses. In this way, if some one asks for the ECHO but never aknowledges your answer, you got a lot of unuseful work.

Unig this 'feature by design' some attackers send lots of ECHO commands but never send the AK and you went overhelmed by the extra work until a DOS.

Hope this helps

lolafuertes 145 Master Poster

This is a problem that can be solved using recursivity.
This can be an example on how to:

Dim NumberToLetter As Char(,) = {{"A"c, "B"c, "C"c}, {"D"c, "E"c, "F"c}, _
	  {"G"c, "H"c, "I"c}, {"J"c, "K"c, "L"c}, {"M"c, "N"c, "O"c}, _
	  {"P"c, "R"c, "S"c}, {"T"c, "U"c, "V"c}, {"W"c, "X"c, "Y"c}}

	Function PhoneWordsGenerator(ByVal PhoneNumber As String) As String()
		'
		'	Declare the words to return
		'
		Dim Words As String()
		'
		'	Declare the initial character of the phone string to process
		'
		Dim Level As Integer = 0
		'
		'	Call to generate the words corresponding to the current level
		'
		Words = GenerateLevel(PhoneNumber, Level)
		'
		'	Sort the result
		'
		Array.Sort(Words)
		'
		'	Return them
		'
		Return Words
	End Function

	Function GenerateLevel(ByVal PhoneNumber As String, ByVal Level As Integer) As String()
		'
		'	Declare the words to return
		'
		Dim Words As String() = Nothing
		'
		'	If this is not the las character in the pnone string
		'
		If Level < PhoneNumber.Length - 1 Then
			'
			'	Get the sub words from the next character in the phone string
			'
			Dim SubWords As String()
			'
			'	Recursive call for the next level
			'
			SubWords = GenerateLevel(PhoneNumber, Level + 1)
			'
			'	Redim the words to return to hol 3 times the subwords returnes
			'
			ReDim Preserve Words((SubWords.Length * 3) - 1)
			'
			'	Declare the pointer to the insert word position in the words array
			'
			Dim WordPosition As Integer = 0
			'
			'  For each letter …
lolafuertes 145 Master Poster

Please, be so kind to confirm:
1) Disk C: has been NTFS formatted
2) The folder C:\DailyLog exists
3) The user running the application has Modify permission to this folder and almost Read permissions on C:\
4) The file C:\DailyLog\logo.gif does not exist before saving

Thanks in advance

lolafuertes 145 Master Poster

Can you be so kind to show us the current code?

lolafuertes 145 Master Poster

As far as I know, ACCESS does not support the bulk insert sentence you write.

Please read http://www.codeproject.com/KB/database/BulkRecordInsertAccess.aspx having an example and the sources on how to do a bulk insert into ACCESS.

Hope this helps

lolafuertes 145 Master Poster

Please post your code written so far to analyze and try to help.

lolafuertes 145 Master Poster

You can change every assignement by using the IIF(test, true_part, false_part) function:

Formreceipt.Label1.Text = IIF(lvlist2.Items.Count > 0, lvlist2.Items(0).SubItems(1).Text, "")
Formreceipt.Label1.Text = IIF(lvlist2.Items.Count > 1, lvlist2.Items(1).SubItems(1).Text, "")
Formreceipt.Label1.Text = IIF(lvlist2.Items.Count > 2, lvlist2.Items(2).SubItems(1).Text, "")
'
'    etc.
'
.
.

Hope this helps

lolafuertes 145 Master Poster

You can change the select to reflect the new column like

Dim sql As String = "SELECT *, Left(ETB.[SalesGroup],3) AS SG FROM(ETB) WHERE (((ETB.[SENT])>=# " & startDate.Date & " # And (ETB.[SENT])<= # " & endDate.Date & "#))"

Hope this helps

lolafuertes 145 Master Poster

I would suggest the following changes (in red):

Public Class Form1

Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click

Dim decBaseFee As Decimal
Const decDiscount As Decimal = 0.8D
Dim decTotalFee As Decimal
Dim intHoursUsed As Integer

If Not Integer.TryParse(txtHoursUsed.Text, intHoursUsed) Then
MessageBox.Show("The number of hours exceeds the limit ", "Input Error")
Return

End If

If (intHoursUsed < 1) Or (intHoursUsed > 744) Then
MessageBox.Show("The number of hours exceeds the limit", "Input Error")
Return
End If

If radPackageA.Checked or radPackageB.Checked or radPackageC.Ckecked Then
If radPackageA.Checked = True Then
decBaseFee = CDec(9.95)

If (intHoursUsed > 10) Then
decBaseFee = CDec(9.95 + (intHoursUsed - 10) * 2.0)

End If

ElseIf radPackageB.Checked = True Then
decBaseFee = CDec(14.95)

If (intHoursUsed > 20) Then
decBaseFee = CDec(14.95 + (intHoursUsed - 20) * 1.0)

End If


ElseIf radPackageC.Checked = True Then
decBaseFee = CDec(19.95)



End If

If chkNonprofit.Checked = True Then
decDiscount = 1.0D
End If

decTotalFee = decBaseFee * decDiscount 

lblTotalAmountDue.Text = decTotalFee.ToString("c")
Else
MessageBox.Show("Must select one package option", "Input Error")
End If
End Sub

Private Sub btnReset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReset.Click
radPackageA.Checked = False
radPackageB.Checked = False
radPackageC.Checked = False
txtHoursUsed.Clear()
txtCode.Clear()
lblNumberofHours.Text = String.Empty
lblTotalAmountDue.Text = String.Empty

End Sub

Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click

Me.Close()
End Sub
End Class

Hope this helps