Is it me? Or don't data adapters and access work?

  • Thread starter Thread starter Daren Hawes
  • Start date Start date
D

Daren Hawes

I am having great troubles with Data Adapters, Access and Concurrency.

Does everyone have to modify the SQL statements to get tit to work?

I am only using a single Access DB per application, so I really do not
need to worry about concurrency.

Can I turn it off?

Thx
 
I simply drag and drop the table from the server explorer. Below is an
example of an update..

'
'OleDbUpdateCommand1
'
Me.OleDbUpdateCommand1.CommandText = "UPDATE Events SET
Alkalinity = ?, Ammonia = ?, Calcium = ?, [Date Of Test] = ?, N" & _
"itrate = ?, Nitrite = ?, pH = ?, Phosphate = ?, [Salt Level] =
?, Temperature = " & _
"?, [Test Notes] = ? WHERE (EventID = ?) AND (Alkalinity = ? OR
? IS NULL AND Alk" & _
"alinity IS NULL) AND (Ammonia = ? OR ? IS NULL AND Ammonia IS
NULL) AND (Calcium" & _
" = ? OR ? IS NULL AND Calcium IS NULL) AND ([Date Of Test] = ?
OR ? IS NULL AND " & _
"[Date Of Test] IS NULL) AND (Nitrate = ? OR ? IS NULL AND
Nitrate IS NULL) AND (" & _
"Nitrite = ? OR ? IS NULL AND Nitrite IS NULL) AND (Phosphate =
? OR ? IS NULL AN" & _
"D Phosphate IS NULL) AND ([Salt Level] = ? OR ? IS NULL AND
[Salt Level] IS NULL" & _
") AND (Temperature = ? OR ? IS NULL AND Temperature IS NULL)
AND (pH = ? OR ? IS" & _
" NULL AND pH IS NULL)"
Me.OleDbUpdateCommand1.Connection = Me.OleDbConnection1
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Alkalinity",
System.Data.OleDb.OleDbType.Single, 0, "Alkalinity"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Ammonia",
System.Data.OleDb.OleDbType.Single, 0, "Ammonia"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Calcium",
System.Data.OleDb.OleDbType.Single, 0, "Calcium"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Date_Of_Test",
System.Data.OleDb.OleDbType.DBDate, 0, "Date Of Test"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Nitrate",
System.Data.OleDb.OleDbType.Single, 0, "Nitrate"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Nitrite",
System.Data.OleDb.OleDbType.Single, 0, "Nitrite"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("pH",
System.Data.OleDb.OleDbType.Single, 0, "pH"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Phosphate",
System.Data.OleDb.OleDbType.Single, 0, "Phosphate"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Salt_Level",
System.Data.OleDb.OleDbType.Single, 0, "Salt Level"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Temperature",
System.Data.OleDb.OleDbType.Single, 0, "Temperature"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Test_Notes",
System.Data.OleDb.OleDbType.VarWChar, 0, "Test Notes"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_EventID",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "EventID", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Alkalinity",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Alkalinity", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Alkalinity1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Alkalinity", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Ammonia",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Ammonia", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Ammonia1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Ammonia", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Calcium",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Calcium", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Calcium1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Calcium", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Date_Of_Test",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Date Of Test", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Date_Of_Test1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Date Of Test", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Nitrate",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Nitrate", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Nitrate1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Nitrate", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Nitrite",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Nitrite", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Nitrite1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Nitrite", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Phosphate",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Phosphate", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Phosphate1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Phosphate", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Salt_Level",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Salt Level", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Salt_Level1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Salt Level", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Temperature",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Temperature", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Temperature1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Temperature", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_pH",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "pH", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_pH1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "pH", System.Data.DataRowVersion.Original, Nothing))


-----Original Message-----
From: Sahil Malik [mailto:[email protected]]
Posted At: Saturday, 11 December 2004 6:23 AM
Posted To: microsoft.public.dotnet.framework.adonet
Conversation: Is it me? Or don't data adapters and access work?
Subject: Re: Is it me? Or don't data adapters and access work?


Umm .. How exactly are you generating your commands? Command (don't use)
Builder?

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
http://blogs.apress.com/authors.php?author=Sahil Malik
 
The DataForm Wizard and autogenerated code make a fairly good attempt at
making code that prevents concurrency issues. However, as you can see the
SQL commands generated are inefficient and ugly. To get the fine grained
control you need to get your hands dirty and write out code yourself - which
is not that hard to be quite honest. And frankly I am glad it doesn't
because then someone would create a VisualStudio.exe /codeautomatically=true
switch and we'd all loose our jobs.

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik





Daren Hawes said:
I simply drag and drop the table from the server explorer. Below is an
example of an update..

'
'OleDbUpdateCommand1
'
Me.OleDbUpdateCommand1.CommandText = "UPDATE Events SET
Alkalinity = ?, Ammonia = ?, Calcium = ?, [Date Of Test] = ?, N" & _
"itrate = ?, Nitrite = ?, pH = ?, Phosphate = ?, [Salt Level] =
?, Temperature = " & _
"?, [Test Notes] = ? WHERE (EventID = ?) AND (Alkalinity = ? OR
? IS NULL AND Alk" & _
"alinity IS NULL) AND (Ammonia = ? OR ? IS NULL AND Ammonia IS
NULL) AND (Calcium" & _
" = ? OR ? IS NULL AND Calcium IS NULL) AND ([Date Of Test] = ?
OR ? IS NULL AND " & _
"[Date Of Test] IS NULL) AND (Nitrate = ? OR ? IS NULL AND
Nitrate IS NULL) AND (" & _
"Nitrite = ? OR ? IS NULL AND Nitrite IS NULL) AND (Phosphate =
? OR ? IS NULL AN" & _
"D Phosphate IS NULL) AND ([Salt Level] = ? OR ? IS NULL AND
[Salt Level] IS NULL" & _
") AND (Temperature = ? OR ? IS NULL AND Temperature IS NULL)
AND (pH = ? OR ? IS" & _
" NULL AND pH IS NULL)"
Me.OleDbUpdateCommand1.Connection = Me.OleDbConnection1
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Alkalinity",
System.Data.OleDb.OleDbType.Single, 0, "Alkalinity"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Ammonia",
System.Data.OleDb.OleDbType.Single, 0, "Ammonia"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Calcium",
System.Data.OleDb.OleDbType.Single, 0, "Calcium"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Date_Of_Test",
System.Data.OleDb.OleDbType.DBDate, 0, "Date Of Test"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Nitrate",
System.Data.OleDb.OleDbType.Single, 0, "Nitrate"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Nitrite",
System.Data.OleDb.OleDbType.Single, 0, "Nitrite"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("pH",
System.Data.OleDb.OleDbType.Single, 0, "pH"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Phosphate",
System.Data.OleDb.OleDbType.Single, 0, "Phosphate"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Salt_Level",
System.Data.OleDb.OleDbType.Single, 0, "Salt Level"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Temperature",
System.Data.OleDb.OleDbType.Single, 0, "Temperature"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Test_Notes",
System.Data.OleDb.OleDbType.VarWChar, 0, "Test Notes"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_EventID",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "EventID", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Alkalinity",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Alkalinity", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Alkalinity1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Alkalinity", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Ammonia",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Ammonia", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Ammonia1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Ammonia", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Calcium",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Calcium", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Calcium1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Calcium", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Date_Of_Test",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Date Of Test", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Date_Of_Test1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Date Of Test", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Nitrate",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Nitrate", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Nitrate1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Nitrate", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Nitrite",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Nitrite", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Nitrite1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Nitrite", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Phosphate",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Phosphate", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Phosphate1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Phosphate", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Salt_Level",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Salt Level", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Salt_Level1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Salt Level", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Temperature",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Temperature", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Temperature1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Temperature", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_pH",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "pH", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_pH1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "pH", System.Data.DataRowVersion.Original, Nothing))


-----Original Message-----
From: Sahil Malik [mailto:[email protected]]
Posted At: Saturday, 11 December 2004 6:23 AM
Posted To: microsoft.public.dotnet.framework.adonet
Conversation: Is it me? Or don't data adapters and access work?
Subject: Re: Is it me? Or don't data adapters and access work?


Umm .. How exactly are you generating your commands? Command (don't use)
Builder?

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
http://blogs.apress.com/authors.php?author=Sahil Malik



Daren Hawes said:
I am having great troubles with Data Adapters, Access and Concurrency.

Does everyone have to modify the SQL statements to get tit to work?

I am only using a single Access DB per application, so I really do not
need to worry about concurrency.

Can I turn it off?

Thx
 
In my experience, I've frequently found myself modifying commands that were
generated by the DataAdapter wizard. Your example typifies one of the
reasons. That WHERE clause is an absolute bear. I would look for some other
way to uniquely identify records for use in the WHERE clause; a primary key
would be an obvious choice. Just change the where clause to use the primary
key (of the actual database table - I'm don't mean a primary key of the
internal DataTable). Then, make sure the column mapping is set up for that.
You'll be good to go. It will make for a much more straightforward solution
and likely to be significantly more efficient.

I still like to use the wizard to generate the commands. It eliminates
quite a bit of grunt work. But I agree with Sahil Malik to the extent that
you don't want to accept those commands on blind faith.

Daren Hawes said:
I simply drag and drop the table from the server explorer. Below is an
example of an update..

'
'OleDbUpdateCommand1
'
Me.OleDbUpdateCommand1.CommandText = "UPDATE Events SET
Alkalinity = ?, Ammonia = ?, Calcium = ?, [Date Of Test] = ?, N" & _
"itrate = ?, Nitrite = ?, pH = ?, Phosphate = ?, [Salt Level] =
?, Temperature = " & _
"?, [Test Notes] = ? WHERE (EventID = ?) AND (Alkalinity = ? OR
? IS NULL AND Alk" & _
"alinity IS NULL) AND (Ammonia = ? OR ? IS NULL AND Ammonia IS
NULL) AND (Calcium" & _
" = ? OR ? IS NULL AND Calcium IS NULL) AND ([Date Of Test] = ?
OR ? IS NULL AND " & _
"[Date Of Test] IS NULL) AND (Nitrate = ? OR ? IS NULL AND
Nitrate IS NULL) AND (" & _
"Nitrite = ? OR ? IS NULL AND Nitrite IS NULL) AND (Phosphate =
? OR ? IS NULL AN" & _
"D Phosphate IS NULL) AND ([Salt Level] = ? OR ? IS NULL AND
[Salt Level] IS NULL" & _
") AND (Temperature = ? OR ? IS NULL AND Temperature IS NULL)
AND (pH = ? OR ? IS" & _
" NULL AND pH IS NULL)"
Me.OleDbUpdateCommand1.Connection = Me.OleDbConnection1
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Alkalinity",
System.Data.OleDb.OleDbType.Single, 0, "Alkalinity"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Ammonia",
System.Data.OleDb.OleDbType.Single, 0, "Ammonia"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Calcium",
System.Data.OleDb.OleDbType.Single, 0, "Calcium"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Date_Of_Test",
System.Data.OleDb.OleDbType.DBDate, 0, "Date Of Test"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Nitrate",
System.Data.OleDb.OleDbType.Single, 0, "Nitrate"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Nitrite",
System.Data.OleDb.OleDbType.Single, 0, "Nitrite"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("pH",
System.Data.OleDb.OleDbType.Single, 0, "pH"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Phosphate",
System.Data.OleDb.OleDbType.Single, 0, "Phosphate"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Salt_Level",
System.Data.OleDb.OleDbType.Single, 0, "Salt Level"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Temperature",
System.Data.OleDb.OleDbType.Single, 0, "Temperature"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Test_Notes",
System.Data.OleDb.OleDbType.VarWChar, 0, "Test Notes"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_EventID",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "EventID", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Alkalinity",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Alkalinity", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Alkalinity1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Alkalinity", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Ammonia",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Ammonia", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Ammonia1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Ammonia", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Calcium",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Calcium", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Calcium1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Calcium", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Date_Of_Test",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Date Of Test", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Date_Of_Test1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Date Of Test", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Nitrate",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Nitrate", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Nitrate1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Nitrate", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Nitrite",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Nitrite", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Nitrite1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Nitrite", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Phosphate",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Phosphate", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Phosphate1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Phosphate", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Salt_Level",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Salt Level", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Salt_Level1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Salt Level", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Temperature",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Temperature", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Temperature1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Temperature", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_pH",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "pH", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_pH1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "pH", System.Data.DataRowVersion.Original, Nothing))


-----Original Message-----
From: Sahil Malik [mailto:[email protected]]
Posted At: Saturday, 11 December 2004 6:23 AM
Posted To: microsoft.public.dotnet.framework.adonet
Conversation: Is it me? Or don't data adapters and access work?
Subject: Re: Is it me? Or don't data adapters and access work?


Umm .. How exactly are you generating your commands? Command (don't use)
Builder?

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
http://blogs.apress.com/authors.php?author=Sahil Malik



Daren Hawes said:
I am having great troubles with Data Adapters, Access and Concurrency.

Does everyone have to modify the SQL statements to get tit to work?

I am only using a single Access DB per application, so I really do not
need to worry about concurrency.

Can I turn it off?

Thx
 
Exactly my thoughts.

So far (atleast in my head) it looks like as below ----

Level of effort: Automatic
............................................................. Manual
Code Quality : Bad
.........................................................................
Good

ASP.NET 2.0 DataBinding promises to change that - we'll see.

Also a fully manual implementation of ADO.NET calling a Sql Command is .. oh
well about 5 lines of code ... not that bad. The autogenerated is a pig in
comparison. OINK OINK !!

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik




Rich said:
In my experience, I've frequently found myself modifying commands that were
generated by the DataAdapter wizard. Your example typifies one of the
reasons. That WHERE clause is an absolute bear. I would look for some other
way to uniquely identify records for use in the WHERE clause; a primary key
would be an obvious choice. Just change the where clause to use the primary
key (of the actual database table - I'm don't mean a primary key of the
internal DataTable). Then, make sure the column mapping is set up for that.
You'll be good to go. It will make for a much more straightforward solution
and likely to be significantly more efficient.

I still like to use the wizard to generate the commands. It eliminates
quite a bit of grunt work. But I agree with Sahil Malik to the extent that
you don't want to accept those commands on blind faith.

Daren Hawes said:
I simply drag and drop the table from the server explorer. Below is an
example of an update..

'
'OleDbUpdateCommand1
'
Me.OleDbUpdateCommand1.CommandText = "UPDATE Events SET
Alkalinity = ?, Ammonia = ?, Calcium = ?, [Date Of Test] = ?, N" & _
"itrate = ?, Nitrite = ?, pH = ?, Phosphate = ?, [Salt Level] =
?, Temperature = " & _
"?, [Test Notes] = ? WHERE (EventID = ?) AND (Alkalinity = ? OR
? IS NULL AND Alk" & _
"alinity IS NULL) AND (Ammonia = ? OR ? IS NULL AND Ammonia IS
NULL) AND (Calcium" & _
" = ? OR ? IS NULL AND Calcium IS NULL) AND ([Date Of Test] = ?
OR ? IS NULL AND " & _
"[Date Of Test] IS NULL) AND (Nitrate = ? OR ? IS NULL AND
Nitrate IS NULL) AND (" & _
"Nitrite = ? OR ? IS NULL AND Nitrite IS NULL) AND (Phosphate =
? OR ? IS NULL AN" & _
"D Phosphate IS NULL) AND ([Salt Level] = ? OR ? IS NULL AND
[Salt Level] IS NULL" & _
") AND (Temperature = ? OR ? IS NULL AND Temperature IS NULL)
AND (pH = ? OR ? IS" & _
" NULL AND pH IS NULL)"
Me.OleDbUpdateCommand1.Connection = Me.OleDbConnection1
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Alkalinity",
System.Data.OleDb.OleDbType.Single, 0, "Alkalinity"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Ammonia",
System.Data.OleDb.OleDbType.Single, 0, "Ammonia"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Calcium",
System.Data.OleDb.OleDbType.Single, 0, "Calcium"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Date_Of_Test",
System.Data.OleDb.OleDbType.DBDate, 0, "Date Of Test"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Nitrate",
System.Data.OleDb.OleDbType.Single, 0, "Nitrate"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Nitrite",
System.Data.OleDb.OleDbType.Single, 0, "Nitrite"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("pH",
System.Data.OleDb.OleDbType.Single, 0, "pH"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Phosphate",
System.Data.OleDb.OleDbType.Single, 0, "Phosphate"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Salt_Level",
System.Data.OleDb.OleDbType.Single, 0, "Salt Level"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Temperature",
System.Data.OleDb.OleDbType.Single, 0, "Temperature"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Test_Notes",
System.Data.OleDb.OleDbType.VarWChar, 0, "Test Notes"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_EventID",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "EventID", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Alkalinity",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Alkalinity", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Alkalinity1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Alkalinity", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Ammonia",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Ammonia", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Ammonia1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Ammonia", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Calcium",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Calcium", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Calcium1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Calcium", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Date_Of_Test",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Date Of Test", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Date_Of_Test1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Date Of Test", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Nitrate",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Nitrate", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Nitrate1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Nitrate", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Nitrite",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Nitrite", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Nitrite1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Nitrite", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Phosphate",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Phosphate", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Phosphate1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Phosphate", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Salt_Level",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Salt Level", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Salt_Level1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Salt Level", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Temperature",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Temperature", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Temperature1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Temperature", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_pH",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "pH", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_pH1",
System.Data.OleDb.OleDbType.Single, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "pH", System.Data.DataRowVersion.Original, Nothing))


-----Original Message-----
From: Sahil Malik [mailto:[email protected]]
Posted At: Saturday, 11 December 2004 6:23 AM
Posted To: microsoft.public.dotnet.framework.adonet
Conversation: Is it me? Or don't data adapters and access work?
Subject: Re: Is it me? Or don't data adapters and access work?


Umm .. How exactly are you generating your commands? Command (don't use)
Builder?

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
http://blogs.apress.com/authors.php?author=Sahil Malik



Daren Hawes said:
I am having great troubles with Data Adapters, Access and Concurrency.

Does everyone have to modify the SQL statements to get tit to work?

I am only using a single Access DB per application, so I really do not
need to worry about concurrency.

Can I turn it off?

Thx
 
You do have to change the generated SQL a lot of times. Here's how my company dealt with it....

We implemented a Table Design Policy that all tables would have a certian standardized format. For our purposes we made sure that every table had an ID field (autonumber) DateCreates, CreateUser, LastUpdateDateTime, LastUpdateUser. This didn't mean that some of the tables can not have complex keys, but those fields always had to exist.

Once we had a standardives set of fields that we could always rely on, we built scripts that would generate the Stored Procedures and Data Adapter code for the tables the way we needed them to be made. (e.g. kep management, cuncurrency checks and table locking).

I hope this helps you out a little
I am having great troubles with Data Adapters, Access and Concurrency.

Does everyone have to modify the SQL statements to get tit to work?

I am only using a single Access DB per application, so I really do not need to worry about concurrency.

Can I turn it off?

Thx
 
Back
Top