Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Do you have the latest .NET framework installed? It may be that the SortedSet is a recent addition that you don't have yet. You can also do the sort by

Dim lines() As String = System.IO.File.ReadAllLines("d:\temp\test1.csv")
Array.Sort(lines)

This should work on your version of the framework

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

While I'm looking can you please tell me what version of VB you are running? That might explain why you get an error and I don't. I have Visual Studio 2010.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

can you elaborate more so that i can imporve

We are not your therapist. I think you have been given ample suggestions to chew on. If you want it reduced to basics then consider the words of Wil Wheaton. To wit, "Don't be a dick."

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You don't have to import anything or add any special references. It works fine for me. What error are you getting? I assumed based on the sample data you gave that the fields are fixed width. As such you don't have to specify the first field as the sort field. You can just sort based on the entire line.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The better you serve your customer's requirements, the more valuable you are.

Again, it depends on what the customer's requirements are. Before I retired, a programmer in another department always met his deadlines with code for a critical project (water reservoir management as pertains to hydro-electric generation). He wrote his code using modules that he developed in PL/1. Eventually he left the corporation. Within a year of his leaving, they had to hire him back as a contractor at several times his original salary because none of his code was documented and was written so horribly that nobody else could understand it. Under the new contract his rewritten code had to be peer-reviewed (at yet further cost) and approved at every stage.

Strictly speaking he satisfied the customer's original requirements. The code met all the specs and ran correctly. However, the code was impossible to maintain or modify so in the long run the customer was poorly served.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

So if it isn't experience or ability it is likely something else. Without getting into specifics, I'm sure you recall a PM I sent you recently. Consider that when you read point number 1. As for the remaining points, I only list them as possibilities. I do not assume that any of them apply to you, but I have seen others fail a job interview because of one or more of those points.

  1. Did you act in a mature manner during the interviews? Did you answer all questions seriously, even the "throw away" ones as you were settling in for the interview or getting up to leave? Some interviewers will use these questions to get a feel for you.
  2. Did you dress appropriately? Was your hair cut neatly? Do you have facial piercings or tattoos? You may think it is your right to express yourself with piercings, etc. (and you would be right), but first impressions count and the interviewer has the right to make assumptions based on your appearance.
  3. Did you have proper hygiene? Did you go into the interview smelling of last night's beer bash or garlic and limburger cheese fest? Did you brush your teeth and apply deodorant earlier? If you have sweaty palms did you wipe them before going in and shaking the interviewer's hand?
  4. Did you sit with proper posture? Were you sitting attentively or were you slouching. Did your posture suggest an open attitude or a confrontational one? Were you sitting with your arms …
Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You can use a sorted set as

Dim sort As New SortedSet(Of String)
Dim sw As New System.IO.StreamWriter("d:\temp\test2.csv")

For Each line As String In System.IO.File.ReadAllLines("d:\temp\test1.csv")
    sort.Add(line)
Next

For Each line As String In sort
    sw.WriteLine(line)
Next

sw.Close()
Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

How about

Public Class Form1

    Private Sub TextBox1_TextChanged(sender As System.Object, e As System.EventArgs) Handles TextBox1.TextChanged
        SetPlayQuit()
    End Sub

    Private Sub TextBox2_TextChanged(sender As System.Object, e As System.EventArgs) Handles TextBox2.TextChanged
        SetPlayQuit()
    End Sub

    Private Sub SetPlayQuit()

        'If we are not currently playing a game, this sub will disable the
        'play button if either of the player text boxes is empty.

        If btnPlayQuit.Text = "Play" Then
            btnPlayQuit.Enabled = TextBox1.Text <> "" And TextBox2.Text <> ""
        End If

    End Sub

    Private Sub btnPlayQuit_Click(sender As System.Object, e As System.EventArgs) Handles btnPlayQuit.Click

        Select btnPlayQuit.Text
            Case "Play"
                btnPlayQuit.Text = "Quit"
                TextBox1.Enabled = False
                TextBox2.Enabled = False
            Case "Quit"
                btnPlayQuit.Text = "Play"
                TextBox1.Clear()
                TextBox2.Clear()
                TextBox1.Enabled = True
                TextBox2.Enabled = True
                'add code here to start playing
        End Select

    End Sub

End Class

You don't really need to enable/disable the textboxes but it does prevent changing the values while the game is in play.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Tucktail is flagged by Trend Micro as Trend Micro has confirmed that this website can transmit malicious software or has been involved in online scams or fraud.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

My first two jobs paid peanuts but the experience was priceless and the work was fascinating. My first job was at what once was a hospital but by then had been converted to a rehab facility for children recovering from surgeries for burns and amputations. We also were a leading centre for custom prosthetics/orthotics. In a rather perverse reversal of circumstances, each succesive job came with an increase in pay and greater job security, but a decrease in my work area.

First Job

Spacious private office on the second floor overlooking a park right on the banks of the Red River. I had a private bathroom with a shower. It was a good thing the office was spacious because I had to work from a gurney for several months due to a serious back injury.

Second Job

Private office the size of a large broom closet overlooking a parking lot in downtown Winnipeg.

Third Job

A cubicle.

I was told at university that 99% of the available jobs would be in data processing so I shouldn't expect to find my dream job. As it turned out, my career path ended up being in areas that kept me intellectually stimulated (and also well compensated, at least by the time I got to my last job).

It's like people who go through to be lawyers. They all dream of being Perry Mason but the reality is most of them end up doing grunt work. That's life. We can't all win the job …

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I just put it into standby at night.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Try

CornerHover.BackgroundImage = Nothing
Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
RichTextBox1.LoadFile(filename)

will do the trick.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

RichTextBox1.Text = "new text"

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

That depends on what, specifically you want to do. If you want to implement a search-and-replace feature where the user enters the text to search for and the replacement text then you do it one way. If you want to allow the user to select a block of text and replace it with some other text then you do it another way. Please give us some more details.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

It looks fine to me. I showed you the format of the INSERT in an earlier post. The thing to remember is that you should include both the field names and the field values. As long as you specify both then you don't have to worry about the actual order of the fields in the table. For example, if you have a table

ID         number
LastName   varchar(50)
FirstNamr  varchar(50)

The both of the following inserts will work

sql = "INSERT INTO myTable (ID,LastName,FirstName) VALUES(123,'Jetson','George')"
sql = "INSERT INTO myTable (ID,FirstName,LastName) VALUES(123,'George','Jetson')"

con.Execute(sql)

You may want to browse this SQL Tutorial

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

rec is a recordset. If you are using ADO then it doesn't matter if you are using VB6, VB.net, VBScript or whatever. But you should be consistent with what type of interface you are using. As far as I know, SQLClient and OLEDB are both built on top of ADO. SQLClient is for working with SQL databases only and is optimized for that. OLEDB can be used to connect to just about any data source. Here are examples for populating a ListView using all three interfaces. I can't provide you with a working example using an Access database because I do not have Access installed, however, the only difference would be in the connection string (and possibly the wildcard characters used in the queries).

Imports System.Text.RegularExpressions
Imports System.Data.SqlClient
Imports System.Data.OleDb
Imports ADODB

Public Class Form1

    Private Sub btnSQL_Click(sender As System.Object, e As System.EventArgs) Handles btnSQL.Click

        'SqlClient is optimized for SQL Server and supports named parameters

        ListView1.Items.Clear()

        Dim con As New SqlConnection("Server=.\SQLEXPRESS;Database=PUBS;Trusted_Connection=yes;")
        Dim cmd As New SqlCommand("", con)

        cmd.CommandText = "SELECT au_lname,au_fname,zip FROM authors WHERE au_lname like @pattern"
        cmd.Parameters.AddWithValue("@pattern", "%")

        con.Open()

        Dim rdr As SqlDataReader = cmd.ExecuteReader

        Do While rdr.Read()
            ListView1.Items.Add(New ListViewItem({rdr("au_lname"), rdr("au_fname"), rdr("zip")}))
        Loop

        rdr.Close()
        con.Close()

    End Sub

    Private Sub btnADO_Click(sender As System.Object, e As System.EventArgs) Handles btnADO.Click

        'ADO is the underlying layer for both SqlClient and OLEDB

        ListView1.Items.Clear()

        Dim con As New ADODB.Connection
        Dim rec As New ADODB.Recordset

        con.Open("Driver={SQL Server};Server=.\SQLEXPRESS;Database=PUBS;Trusted_Connection=yes;")
        rec.Open("SELECT au_lname,au_fname,zip FROM authors WHERE au_lname like 'S%'", con, CursorTypeEnum.adOpenStatic)

        Do Until rec.EOF
            ListView1.Items.Add(New ListViewItem({rec("au_lname").Value, rec("au_fname").Value, rec("zip").Value}))
            rec.MoveNext() …
Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

That is correct. When an error occurs in any line in the Try block, execution immediately transfers to the Catch block.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Please read the Please Read This Before Posting. If you had you would have created a descriptive title. You would also have included some sample input and output.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Then what you want is

Try
    whatever command you run to do the insert
    Call ClearFieldsAndVariables()
Catch ex As Exception
    MessageBox.Show("Error while inserting record on table..." & ex.Message, "Insert Records")
Finally
    con.Close()
End Try

What happens is if the insert fails the Catch block is immediately executed. If the insert succeeds then the statements following that (in the Try block) get executed. The Finally portion gets executed whether an error occurs or not.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Using ADO you can insert a new record by

Dim query As String = "INSERT INTO myTable (ID, LastName,FirstName) " _
                    & "  VALUES(123,'Lightyear','Buzz')"

con.Execute(query)

You should put these statements into a Try/Catch block so that you can detect failures. For example, if ID is the primary key and you try to insert a duplicate you will get an error. Also, if you have a type in the table name or one of the field names you will get an error.

For UPDATE and DELETE see my first response.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I don't follow. That's what the Catch portion is for. The Catch part is executed if the Catch As Exception is true.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

OK Thanks for this, but I am using Access MDB.

All you have to change is the connection string. For access you might use

Driver={Microsoft Access Driver (*.mdb)};Dbq=d:\test\mydb.mdb;Uid=USERID;Pwd=PASSWORD;

If you don't require a userid or password just make them blank. Do you want to allow the user to input certain fields for the edit? In other words, will the user in effect build the query to fetch a record? If that is the case stick with OleDB so you can use parameterized queries (to prevent SQL injection attacks). If you can be more specific I could show you the code or you can have a look at a sample here

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

This is why I prefer to do (as a coworker used to call it) "buck naked" programming with ADO instead of adding all of the data adapter/data table layers. Too many layers between you and the data and too hard to find out where things are [m]ucking up.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Please take the time to explain what you want clearly. You said

if I'll type 5 in the textbox so it'll add in the combobox: 1, 2, 3, 4 and 5.

Do you mean you want to do 1+2+3+4+5? Do you mean you want to add the first five items in the combobox? You didn't say what you want to do with the result. If you can't put any effort into the question why should we put any effort into guessing what you want and providing an answer?

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You are not going to like this answer but don't use DAO. ADO is not confusing or riddled with problems. ADO is actually pretty straightforward. The only confusing part can be getting the connection string right and we can help you with that as long as we know what type of database you are connecting to. For example, to connect to my local MS SQL database as a trusted user I would do

Dim con As New ADODB.Connection
con.Open("Driver={SQL Server};Server=.\SQLEXPRESS;Database=PUBS;Trusted_Connection=yes;")

To retrieve records I would do something like

rec.Open("SELECT au_lname,au_fname,zip FROM authors WHERE au_lname like 'S%'", con, CursorTypeEnum.adOpenStatic)

which retrieves all records for authors whose last name starts with S. To delete records do

con.Execute("DELETE FROM authors WHERE au_lname = 'ASIMOV'")

and to edit a record you can do an UPDATE as in

con.Execute("UPDATE authors SET au_fname = 'Dave' WHERE au_lname = 'Barry'")

then when you are done

con.Close()

and if you opened a recordset do (before closing con)

rec.Close()

Just because it was old doesn't mean it was good. Of course, just because it's new doesn't mean it is better.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I don't see an INSERT query anywhere but if I had to guess it would be the embedded spaces in the column names. It's always a bad idea to use names with spaces. With a non-spaced name you can do

INSERT INTO myTable (idnum,FirstName) VALUES(123,'Jim')

But when you have a space (or when you are using a reserved word) you have to use

INSERT INTO myTable (idnum,[First Name]) VALUES(123,'Jim')

I find it easier to use names like FirstName or First_Name.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I could have pointed the OP to the same article but to tell the truth, I'm getting tired of doing the legwork for people who are too damned lazy to even bother looking to see if that question has already been asked and answered.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

This has been asked and answered multiple times. Search this forum as well as the code snippets.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

That's what the code snippets are for. You might want to browse them. Have a look here and here

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

there in datasoure you put the IP address of the computer you connected.

This is not necessary because the OP stated that the database is on the same computer as the app. You can find OleDb connections strings for Access here

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Try looking in the project folder via Explorer. I am using Visual Studio 2010. You?

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If I understand you, what you want to do is detect the ENTER key in the rich text box and do some special processing. You can use the KeyDown event for that.

Private Sub RichTextBox1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles RichTextBox1.KeyDown

    If e.KeyCode = Keys.Enter Then
        'add custom processing code here
        e.SuppressKeyPress = True
    End If

End Sub

Setting e.SuppressKeyPress to True prevents the ENTER key from being further processed by the control.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The formname.Designer.vb file contains the code that creates the controls that you place on your form at design time. Here is an example:

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form1))
        Me.btnPrint = New System.Windows.Forms.Button()
        Me.pd = New System.Drawing.Printing.PrintDocument()
        Me.pp = New System.Windows.Forms.PrintPreviewDialog()
        Me.SuspendLayout()
        '
        'btnPrint
        '
        Me.btnPrint.Location = New System.Drawing.Point(13, 13)
        Me.btnPrint.Name = "btnPrint"
        Me.btnPrint.Size = New System.Drawing.Size(75, 23)
        Me.btnPrint.TabIndex = 0
        Me.btnPrint.Text = "Print"
        Me.btnPrint.UseVisualStyleBackColor = True
        '
        'pd
        '
        '
        'pp
        '
        Me.pp.AutoScrollMargin = New System.Drawing.Size(0, 0)
        Me.pp.AutoScrollMinSize = New System.Drawing.Size(0, 0)
        Me.pp.ClientSize = New System.Drawing.Size(400, 300)
        Me.pp.Enabled = True
        Me.pp.Icon = CType(resources.GetObject("pp.Icon"), System.Drawing.Icon)
        Me.pp.Name = "pp"
        Me.pp.Visible = False
        '
        'Form1
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(284, 262)
        Me.Controls.Add(Me.btnPrint)
        Me.Name = "Form1"
        Me.Text = "Form1"
        Me.ResumeLayout(False)

    End Sub
    Friend WithEvents btnPrint As System.Windows.Forms.Button
    Friend WithEvents pd As System.Drawing.Printing.PrintDocument
    Friend WithEvents pp As System.Windows.Forms.PrintPreviewDialog

End Class
Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Two possible scenarios

  1. If the data is in tabular form you can open the Excel files using ADO or OleDb and read the data like a database
  2. You can use automation objects to access the data cell by cell

I have a sample project for each that I will try to attach to this post.

ddanbe commented: Great! +14
Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

What is your connections string? Does it have the fully qualified path to the access database?

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
  1. How is the database file shared on the network?
  2. Do you have read/write access to the shared folder?
  3. How are you connecting to the database?
Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

lbl.Font = New Font("Arial", 12.0!, FontStyle.Regular, GraphicsUnit.Point, CType(0, Byte))

I just copied that line from the form1.Designer.vb file. GraphicsUnit.Point just specifies the size units. You could also use GraphicsUnit.Pixel (I don't see any difference). You might encapsulate the logic in a sub as follows:

Private Sub AddText(text As String, size As Double, xpos As Integer, ypos As Integer)

    Dim lbl As New Label
    lbl.AutoSize = True
    lbl.Font = New Font("Arial", size, FontStyle.Regular, GraphicsUnit.Pixel)
    lbl.Location = New Point(xpos, ypos)
    lbl.Text = text
    Me.Controls.Add(lbl)

End Sub

If you wanted you could add other parameters such as for the font type, colour, etc.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

i dont want to use label

I don't know why not. It's so simple. You don't even have to name the label unless you want to modify the text after you place it.

Dim lbl As New Label
lbl.Font = New Font("Arial", 12.0!, FontStyle.Regular, GraphicsUnit.Point, CType(0, Byte))
lbl.Location = New Point(40, 50)
lbl.Text = "Sample Text"
Me.Controls.Add(lbl)
Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Change the resolution in the guest OS to match the resolution of your native OS.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

How could SO be using the same code when DaniWeb uses custom in-house code?

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Select the virtual console and press CTRL-ALT-ENTER to toggle between windowed and full-screen.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I prefer to avoid the terms ShortInt and LongInt as they vary depending on the architecture. The number refers to the number of bits (binary digits). For example, Int16 is a 16 bit value. To summarize, as beginnerdev said

Int16 - 16 bit - range is -32768 to 32727
Int32 - 32 bit - range is -2,147,483,648 to 2,147,483,647
Int64 - 64 bit - range is -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807

The max value is determined by raising 2 to the power of the number of bits - 1 (because the leftmost bit is a sign bit) then subtracting 1. So for a 16 bit int (signed) the max value is 2**15 - 1 or 32767.

However, if you are only concerned about positive numbers then you can used their unsigned counterparts which do not reserve a sign bit. These are

UInt16 - max value is 2**16 - 1 or 65,535
UInt32 - max value is 2**32 - 1 or 4,294,967,295
UInt64 - max value is 2**64 - 1 or 18,446,744,073,709,551,615
Begginnerdev commented: Great example! +8
Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

@diafol yes, i am THAT nitin who was stalking WatlP

Based on your behaviour the last time around and assuming an undelete was even possible, what could possibly motivate the powers that be to do so?

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Same problem except this time you are trying to convert a string to a char. Perhaps you could explain what you are trying to accomplish with

lblgrossS.DataBindings.Add("Text", DataSet2, ("'" & txttable.Text & "'")(CInt(".grand_total "))).ToString()
Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You are trying to cast the string ".grand_total " to an integer. It can't be done.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Remember that we live in a society that demands we protect people from themselves at the risk of litigation. Note that we apparently do not live in a society that requires (or expects) people to think for themselves or even display a modicum of common sense.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

SQL Server Express is much better than Access. I recommend you also install SQL Management Studio Express which is also available for free. The instructions can be found here

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I can see that you could be required to provide a password for an encrypted file or folder at Customs when entering the US (although I disagree with the legality) however, at least in Canada, you would not be required to decrypt files either for cloud or locally hosted files unless a search warrant was first produced. Because SpiderOak does not have access to your keys they are required to provide access only to the encrypted files.

Reverend Jim 5,216 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You can't read an Excel file line by line with a simple reader. You can

  1. create an Excel Application object and access it that way or
  2. use ADO or OleDb objects to access the data like a database

Using the first method allows you to access the Excel data on a cell by cell basis. Using the second method allows you to access the data row by row as long as the data is in tabular form (where every row is in the same format).