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

I like the introduction of biometrics, but I heard the phrase "incredible new colours" used at the unveiling. Whoop-di-freakin'-do. New colours, ok. But incredible??? Talk about marketing overkill. I only hope the new colours can manage to live up to the hype.

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

As stated by representative Alan Grayson,

Well, The Daily Caller reported in great detail that the report that the administration relied upon, in which the administration said that the Assad government must have been involved in this attack and ordered this attack because afterward one of the Assad generals commented on it, well, according to The Daily Caller, the comment was "We didn’t do this," or words to that effect. And the administration has—if that’s the case, if that was the comment, the administration has completely mischaracterized it.

And, in fact, as far as I can tell, not a single member of Congress has actually seen the underlying document. What’s been provided to us so far is a four-page unclassified document and, if we bother to go down to the bowels of the congressional facility here, a 12-page classified document. But that classified document cites 300 underlying intelligence reports, none of which have been released to any member of Congress, despite the fact that we all have classified clearance. And I indicated that if there is some possibility that the administration is misleading the public regarding any of those 300 documents, then that has to be dispelled. We can’t go to war by mistake again.

It seems to me that if Obama is keeping documents from members of the government who are

  1. fully entitled to have them
  2. being asked to authorize military action

then he has something to hide. The only reason action is not being taken …

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

because he'll just be penalised for his success

I seriously doubt that the rick (especially since Reagan) can legitimately claim to be punished. They are the only group that has seen their income rise significantly in the last few decades. They enjoy numerous tax breaks that are unavailable to the middle class. Warren buffet said “There’s class warfare, all right, but it’s my class, the rich class, that’s making war, and we’re winning.”

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

You just have to specify enough fields in the WHERE clause to uniquely identify the record you want to UPDATE. If that's not clear enough then post some sample data and I'll try to show you.

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

What do you mean by a "service-based database"? If you are going to convert from Access to SQL server then you can either change your connection string accordingly, or you can use SqlClient which is optimized for SQL Server (and also allows you to use named parameters). Examples of how to connect can be found in this code snippet

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

Reminds me of the line from Die Hard 2 when John Amos says "No. You were right. I am an a$$hole. I'm just your kind of a$$hole." As long as you consider the issues and don't just vote blindly for "your party" I can respect that. Of course, once they get in they'll just do what they want regardless.

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

It would help if you actually put some code in your Catch block otherwise you will never see that you are getting an error. Your first problem is that you are not opening the connection to the database. You commented out that line. Try cnanging your code to

Try
    con = New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Resumen Guia\Base.mdb")
    con.Open()
    str = "insert into Tabla values('" & TextBox1.Text & "')"
    cmd = New OleDb.OleDbCommand(str, con)
    icount = cmd.ExecuteNonQuery
    MessageBox.Show(icount)
Catch ex As Exception
    MsgBox(ex.Message)
End Try

I see you also declared a connection object in the Form1_Load but you don't do anything with it. I suggest you create the object at the class level (global) and set the connection string once in Form1_Load. That way if you change your data source you only have to modify the string in one place.

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

Make your other form the main form and add a custom settings variable at the user level then do

Public Class frmMain

    Private Sub frmMain_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

        If My.Settings.ShowSplash Then
            frmSplash.ShowDialog()
        End If

    End Sub

End Class

Public Class frmSplash

    Private Sub btnDisable_Click(sender As System.Object, e As System.EventArgs) Handles btnDisable.Click
        My.Settings.ShowSplash = False
    End Sub

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

I don't see the problem. Of course, you didn't show us your code. The following works fine for my test file of around 5600 lines of text.

Dim lines() As String = System.IO.File.ReadAllLines("D:\temp\Asimov, Isaac - Elija Baley 01 - The Caves of Steel.txt")
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Problem with a Newfie is when it gets wet it takes days to dry out. We had considered a Pyrennes.

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

We've had three rescue cats as well plus one blue point Himalayan that we got from a breeded. The first was s tricolour kitten that my father-in-law found in his wood pile. We got a black short hair from the Humane Society (kitten) and our latest is a medium hair that we got as a kitten, also from the HS.

Our favourite dogs have by far been the Irish. Very gentle and loaded with personality.

You can tell we like animals (the dog in the picture is staring at a cookie).

8d5a7c702787556d6a27c9c920f9e428

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

We've been lucky (mostly) with our dogs. Our first was an Irish Setter that wandered into our livingroom (door was open while the paint dried) in 1981. We contacted the owner who didn't want him anymore. Our best dog ever. Since then we have had another Irish Setter (puppy from breeder friend), a Shepherd/Husky cross from the Humane Society (my wife was a volunteer dog walker) and another Irish Setter that was lost (owners could not be located). Last November we adopted a golden retriever from a rescue place. That was the end of our good luck with dogs. We suspect he was given up because of medical or behavioural problems. You have to be careful when getting a rescue animal.

<M/> commented: Go Irish Setters! +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The keyword here is "allies". The US wants to go it alone. None of its allies seem to be interested in a military action in Syria. If the US does take military action then it will be the US that has crossed the red line. They will have invaded a country that has not attacked them. That is a violation of international law just like it was when they invaded Iraq.

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

Nope. Never heard of that site before. And for the record, I do not consider myself a libertarian.

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

Or in the insert you can do

INSERT INTO mytable (picid,picture,recordListingID)
VALUES((SELECT MAX(picid)+1 FROM mytable),'george.jpg',0)
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Still raining and still bored. Heres the vb.net code. Note - you will have to add a reference to adodb under the .NET tab.

Public Class Form1

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

        Dim conn As New ADODB.Connection
        Dim rec1 As New ADODB.Recordset
        Dim rec2 As New ADODB.Recordset

        conn.Open("Driver={SQL Server};Server=.\SQLEXPRESS;Database=mydb;Trusted_Connection=yes;")
        rec1.Open("SELECT * FROM version ORDER BY nidt,noeud", conn, 3)

        Dim lastpair As String = ""
        Dim nextpair As String = ""
        Dim nidt As String
        Dim noeud As String
        Dim qry As String
        Dim numop As Integer
        Dim maxver As Integer

        'scan for all distinct nidt-noeud pairs

        Do Until rec1.EOF

            nidt = rec1("nidt").Value
            noeud = rec1("noeud").Value

            nextpair = nidt & noeud

            If nextpair <> lastpair Then

                'get the number of operational versions

                qry = "SELECT COUNT(*) from version " _
                    & " WHERE nidt = '" & nidt & "' AND noeud = " & noeud _
                    & "   AND ETAT_FONCT = 'OPERATIONAL'"
                rec2.Open(qry, conn, ADODB.CursorTypeEnum.adOpenStatic)
                numop = rec2(0).Value
                rec2.Close()

                If numop > 0 Then

                    'there is at least one operational version - get the highest operational version

                    qry = "SELECT MAX(VERSION) from version " _
                        & " WHERE nidt = '" & nidt & "' AND noeud = " & noeud _
                        & "   AND ETAT_FONCT = 'OPERATIONAL'"
                    rec2.Open(qry, conn, ADODB.CursorTypeEnum.adOpenStatic)
                    maxver = rec2(0).Value
                    rec2.Close()

                    qry = "DELETE FROM version " _
                           & " WHERE nidt = '" & nidt & "' AND noeud = " & noeud _
                           & "   AND (ETAT_FONCT = …
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You can take the code almost line for line and put it into vb.net. Incidentally, I created your database (with the given data) and ran the code against it and got the results in your example.

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

Apparently McCain finds online poker more interesting than the potential death of thousands. What the heck. It's not like anyone he knows is going to die.

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

Backbreaking
Labor
Incurs
Skin
Tenderness
Engendering
Red
Sores

Insomnia

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

It's raining and I'm bored. Here's the code in vbscript using ADO.

set conn = CreateObject("ADODB.Connection")
set rec1 = CreateObject("ADODB.RecordSet")
set rec2 = CreateObject("ADODB.RecordSet")

conn.Open("Driver={SQL Server};Server=.\SQLEXPRESS;Database=mydb;Trusted_Connection=yes;")
rec1.Open "SELECT * FROM version ORDER BY nidt,noeud", conn, 3

lastpair = ""

'scan for all distinct nidt-noeud pairs

do until rec1.EOF

    nidt  = rec1("nidt").Value
    noeud = rec1("noeud").Value

    nextpair = nidt & noeud

    if nextpair <> lastpair then

        'get the number of operational versions

        qry = "SELECT COUNT(*) from version " _
            & " WHERE nidt = '" & nidt & "' AND noeud = " & noeud _
            & "   AND ETAT_FONCT = 'OPERATIONAL'"
        rec2.Open(qry), conn, 1
        numop = rec2(0).Value
        rec2.Close

        if numop > 0 then

            'there is at least one operational version - get the highest operational version

            qry = "SELECT MAX(VERSION) from version " _
                & " WHERE nidt = '" & nidt & "' AND noeud = " & noeud _
                & "   AND ETAT_FONCT = 'OPERATIONAL'"
            rec2.Open(qry), conn, 1
            maxver = rec2(0).Value
            rec2.Close

            qry = "DELETE FROM version " _
                & " WHERE nidt = '" & nidt & "' AND noeud = " & noeud _
                & "   AND (ETAT_FONCT = 'NOT_OPERATIONAL' " _
                & "    OR  VERSION < " & maxver & ")"

        else

            'no operational versions - get the highest version

            qry = "SELECT MAX(VERSION) from version " _
                & " WHERE nidt = '" & nidt & "' AND noeud = " & noeud
            rec2.Open(qry), conn, 1
            maxver = rec2(0).Value
            rec2.Close

            qry = "DELETE …
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I don't know if this is possible to do in a single query. Even if possible I suspect it would be so unreadable that it would be wrong to do it. The pseudocode for doing it with multiple queries would be

get all the records sorted by nidt,noeud

step through all the records
    if this is a new nidt-noeud pair
        if there are any OPERATIONAL versions
            get the highest OPERATIONAL version for this nidt-noeud pair
            delete all NOT OPERATIONAL versions and all older OPERATIONAL versions for this nidt-noeud pair
        else
            get the highest version for this nidt-noeud pair
            delete all older versions for this nidt-noeud pair
        end
    end
end
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Sorry. I did not notice the attached images although I'm not sure that clarifies things for me. It still boils down to (regardless of the other conditions)

if OPERATIONAL then 
    delete older versions
else
    delete older versions

What is the difference between
Delete REST ROWS EXCEPT HIGHEST Version
and
DELETE Older verions

Basically there is a disconnect between what you are saying and the pictures. Based solely on the pictures I get

for each distinct nidt,noeud pair
    if there is an operational version then
        delete all non-operational versions
           and all older operational versions
    else
        delete all older versions

Is that more in line with what you want?

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

Syria. The dawn of a new error.

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

I'm not sure I follow. If I reword your conditions (and keep the same meaning, I hope) I get

  1. delete older versions if OPERATIONAL
  2. delete older versions if NOT OPERATIONAL

assuming that delete REST ROWS EXCEPT HIGHEST version means delete all rows except that row for the highest version. The code for that is

DELETE FROM version
 WHERE VERSION < MAX(VERSION)

or am I misinterpreting something?

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

Pipes
Leak
Under
My
Bathroom
Engendering
Repairs

Television

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

Incontinence? How gauche. If anything, my problem is too much continence (damn prostate).

Hucksters
Orchestrate
Mindless
Examples
Of
Pathetic
Attempts
To
Heal
Yokels

Scientist

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

Why is it OK for the US to dump thousands of tons of Agent Orange on Viet Nam? Does that not constitute chemical weapons? The medical costs alone for treatment of US veterans who were exposed is staggering. The chemicals used were highly toxic and carcinogenic so merely labeling them as "defoliants" gives the impression that "We only sprayed weed killer. It's no big deal."

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

Custom
Education
Requires
That
I
Focus
Intelligence
Carefully
At
The
Input
Of
New technology

Retirement

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

Depending on the speed of your connection and the size of the file it might take a few seconds for the post-upload options to appear.

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

Yeah. I recalled that there were major problems. I had just forgotten the gory details. Thanks for the link.

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

Hey. Canada bought used submarines from (I believe) Great Britain. Pretty much what you would expect. They've spent most of their time being repaired. I don't know if they've ever seen service since we got them. It's a good thing we aren't in the market for discount cruise missiles.

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

Let's just leave it at that then until later this month.

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

I tried again using IE and I was able to post. Just not with Chrome (no plugins).

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

cruise missiles that have a limited shelf life

Cruise missiles aren't like broccoli or bananas. If they can keep ICBMs in silos for years ready to use then they can keep those cruise missiles on the shelf. They've been bought and paid for so whether they are used or not is not the issue. Unless you are the guy who makes them in which case you want them used so the government can buy some more.

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

I've switched to Chrome for accessing daniweb and I had a problem just like I had under Firefox. I posted in this thread and it got stuck in limbo. I've reload the page three times and tried reposting but it just won't go through. Screen shot attached.

90447963e7afae5c8bfb7ceac57a8dac

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

Too bad he couldn't keep the guy there for the cops.

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

They are also working for me now. You mentioned a possible problem with a server. Do your logs show which server handles a request?

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

So your plan is to split the project into modules, then ask people on Daniweb to write each piece for you. Not cool.

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

One thing I have found that has a low probability of working, but has worked for me - take the hard drive and put it in the freezer, or cool it down with one those compressed air cleaners (hold the can upside down so it sprays liquid on the drive).

While the drive is cold try spinning it up (an external USB connection would be best). It may buy you time to get the data off. Like I said, a small chance this will work but it's better than no chance.

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

Jump links appear to be not working again. This works but this times out. Other jump links are not working as well.

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

Does it spin up? Does the Windows Disk Manager (diskmgmt.msc) recognize it as a disk? Does it list any partitions?

Depending on the degree of "crashness", SpinRite might be able to recover something. Hard to say without more information. It's like saying your car crashed and asking us if it can be repaired without showing us the extent of the damage.

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

How about a global boolean named MinimizeOnClose which is normally set to True. You could set it to False in ExitToolStripMenuItem_Click. Then in Form1_FormClosing you could test for that and determine whether or not to hide or close. Then your menu handler becomes

Private Sub ExitToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ExitToolStripMenuItem.Click
    MimimizeOnClose = False
    Me.Close()
End Sub
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Blank chat window a few minutes ago.
c2a965eb0ff2c29612f1b562d00c0c2c

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

It seems to have corrected itself. I've noticed this from time to time that the jump links time out while the first post links do not.

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

I'm having a problem today. I'm trying to get to this thread but I can't get to it (problem loading page). However, when I open the thread by clicking on the summary (to get to the first post), it comes up almost immediately. I had the same problem with this thread

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

While I was building the query (which looks like this)

Dim cmd As New OleDbCommand("", conn)
cmd.CommandText = "UPDATE tblstaff " _
                & "   SET fName=?, lName=?, dob=?, eMail=?,  mobileNo=?, " _
                & "       designation=?, address=?, fAppointment=?,  " _
                & "       fpromotion=?, lpromotion=?, publications=?, " _
                & "       position=?,leaveStatus=? " _
                & " WHERE pfNumber=?"

cmd.Parameters.AddWithValue("@fname ", txtFname.Text)
cmd.Parameters.AddWithValue("@lname ", txtLname.Text)
cmd.Parameters.AddWithValue("@dob   ", dtpDob.Value)
cmd.Parameters.AddWithValue("@email ", txtEmail.Text)
cmd.Parameters.AddWithValue("@mobile", txtPno.Text)
cmd.Parameters.AddWithValue("@desig ", txtDesignat.Text)
cmd.Parameters.AddWithValue("@addr  ", txtAddress.Text)
cmd.Parameters.AddWithValue("@fappt ", dtpFappoint.Value)
cmd.Parameters.AddWithValue("@fpromo", dtpFpromo.Value)
cmd.Parameters.AddWithValue("@lpromo", dtpLpromo.Value)
cmd.Parameters.AddWithValue("@pubs  ", txtPublicatn.Text)
cmd.Parameters.AddWithValue("@posn  ", txtPosition.Text)
cmd.Parameters.AddWithValue("@leave ", txtLstatus.Text)
cmd.Parameters.AddWithValue("@pfno  ", txtPfNo.Text)

I noticed that your query was trying to format txtPfNo.Text into the first parameter which is fName='{1}'. That is definitely a problem because none of the parameters line up. Note that when using parameterized queries with SqlClient (which you are not), the "@names" can be added in any order. When using it with OleDb (which is what you would use), the AddWithValue calls must be made in the same order in which the "?" parameters appear in your query.

I cannot actually test this query because I do not have Access installed.

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

DDL is the data definition language, or the command that you execute to create the table. An example of the DDL is

CREATE TABLE [dbo].[PDFStore](
    [FileName] [varchar](500) NOT NULL,
    [Contents] [varbinary](max) NULL,
 CONSTRAINT [PK_PDFStore] PRIMARY KEY CLUSTERED 
(
    [FileName] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

In order to display the data in a listview you have to set it to view details (columnar data)

ListView1.View = View.Details

Normally this would be done at design time. I'm assuming you have already done this. In order to display all of the records returned from the query you will need a loop. An example is

Dim dr As SqlDataReader = sqlcmd.ExecuteReader

Do While dr.Read()
    ListView1.Items.Add(New ListViewItem({rdr("Item"), rdr("Description"), rdr("Quantity"), rdr("Amount")}))
Loop
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I'll put together a parameterized query for you (it's raining all day and I'm bored) but in the meantime I want you to post the structure of your table so I can see the declared type of each field.

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

The only reason the US wants to take Military action is to nuke the hell out of Syria,

There are no profits to be made by nuking Syria. The arms manufacturers get far more money if they send in a few rounds of cruise missiles and start a military occupation that drags on for years like Iraq and Afghanistan. The companies like Haliburton can make billions from government contracts to provide security and infrastructure. As Al Pacino said in The Godfather, "It's not personal. It's business."

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

I think the format for a date in Access queries is #07/05/2013. As for the other fields, the numeric fields should not have single quotes. If the field mobileNo is defined as a numeric then it should not have single quotes. If it is defined as a string (judging by the leading zero I'm assuming it is) then your query string then becomes

UPDATE tblstaff 
   SET fName='Trues', 
       lName='Jethro', 
       dob=#30/12/1988#, 
       eMail='enemali@yahoo.com', 
       mobileNo='08145450902', 
       designation='Graduate Assistant', 
       address='No.23 Inikpi street,High Level', 
       fAppointment=#29/06/2012#, 
       fpromotion=#02/02/2013#, 
       lpromotion=#07/05/2013#, 
       publications='Journal on finger print identification system,Microcontroller configuration.', 
       position='Assistant HOD', 
       leaveStatus='Study leave fo two years' 
       WHERE pfNumber='PF/2664'

and your builder becomes

Dim sql As String = String.Format(" _
    "UPDATE tblstaff " _
    "   SET fName='{1}',lName='{2}', dob=#{3}#, eMail='{4}', " _
    "    mobileNo='{5}', designation='{6}', address='{7}', " _
    "    fAppointment=#{8}#, fpromotion=#{9}#, lpromotion=#{10}#, " _
    "    publications='{11}', position='{12}', leaveStatus='{13}' " _
    WHERE pfNumber='{0}'", _

    etc.

but you would be better off using parameterized queries. There is an example using OleDb here