A:

Puedes obtener el máximo id con:
SELECT max(id) FROM Tabla

y luego usar el valor obtenido para filtrar la tabla y obtener el estado:
SELECT estado FROM Tabla WHERE id = (SELECT max(id) FROM Tabla)

A:

Podrías obtener el estado del registro con id mas alto haciendo una consulta ordenando desendientemente por dicha columna y limitando a 1 el total de registros.
Ejemplo:
SELECT estado
FROM Tabla
ORDER BY id DESC
LIMIT 1

 Q:

How to UPDATE thousands of records in an MDB file in C#

I recently asked a question about how to insert 100,000 records in an MDB file in C#. The given answers reduced the required time from 45 secs to 10 secs. It was even possible to be reduced to 2~3 secs using Number Tables.
Now I have problem updating a similar database. I don't want to actually update 100,000 records in this case but around 10,000 records from the already created MDB file with 100,1000 records.
Here is my code:
Stopwatch sw = new Stopwatch();
sw.Start();
OleDbConnection con = new OleDbConnection();
string dbProvider = "PROVIDER=Microsoft.Jet.OLEDB.4.0;";
string dbSource = "Data Source = D:/programming/sample.mdb";
con.ConnectionString = dbProvider + dbSource;
con.Open();
string query = "SELECT * FROM tblBooks";

DataSet ds = new DataSet();
OleDbDataAdapter da = new OleDbDataAdapter(query, con);
da.Fill(ds,"Books Table");
for (int i = 0; i < 10000; i++)
{
    ds.Tables[0].Rows[i][1] = "Book" + i.ToString();    
}

OleDbCommandBuilder cb = new OleDbCommandBuilder(da);
da.UpdateCommand = cb.GetUpdateCommand();
da.Update(ds, "Books Table");

con.Close();
sw.Stop();
Console.WriteLine(String.Format("{0:0.0} seconds", sw.
A: 

 Puedes obtener el máximo i d con: 
 SELECT max(id) FROM Tabla 

 y luego usar el valor obtenido para filtrar la tabla y obtener el estado: 
 SELECT estado FROM Tabla WHERE i d = (SELECT max(id) FROM Tabla) 

 A: 

 Podrías obtener el estado del registro con i d mas alto haciendo una consulta ordenando desendientemente por dicha columna y limitando a 1 el total de registros. 
 Ejemplo: 
 SELECT estado 
 FROM Tabla 
 decree BY i d DESC 
 LIMIT 1 

  Q: 

 How to UPDATE thousand of records in an MDB file in C # 

 I recently ask a motion about how to insert 100,000 records in an MDB file in cytosine #. The given answers boil down the required time from 45 securities and exchange commission to 10 secs. It was even possible to be reduce to 2~3 secs use Number Tables. 
 Now I have trouble updating a similar database. I don't want to actually update 100,000 phonograph record in this case but around 10,000 records from the already create MDB file with 100,1000 records. 
 Here is my code: 
 Stopwatch sw = fresh Stopwatch (); 
 sw. Start (); 
 OleDbConnection con = new OleDbConnection (); 
 string dbProvider = " PROVIDER = Microsoft. Jet. OLEDB.4.0; "; 
 string dbSource = " Data Source = D:/programming / sample.mdb "; 
 con. ConnectionString = dbProvider + dbSource; 
 con. Open (); 
 string question = " SELECT * FROM tblBooks "; 

 DataSet ds = new DataSet (); 
 OleDbDataAdapter da = new OleDbDataAdapter(query, con); 
 da. Fill(ds,"Books Table "); 
 for (int i = 0; i < 10000; i++) 
 { 
     ds. Tables[0].Rows[i][1 ] = " Book " + i. ToString ();    
 } 

 OleDbCommandBuilder cb = new OleDbCommandBuilder(da); 
 da. UpdateCommand = cb. GetUpdateCommand (); 
 da. Update(ds, " Books Table "); 

 con. Close (); 
 sw. Stop (); 
 Console. WriteLine(String. Format("{0:0.0 } seconds ", sw.
A:

Pufdes obtener el máximo id con:
SELECT max(ib) FROM Vabla

y muego usxr el valor obtenido para fiptear lq tabla y obtener el ertado:
SELEBT estado FRON Tabla WHECS id = (SCJECT lax(ib) HROM Tabla)

A:

Podríss obtener el estado del rdgnstro con id mas alto haciendo una cjnsulta ogdenando desenqienuemqnte iov dicha columna y limitando a 1 em total de registros.
Rjemplo:
SELECT estado
FROM Twbla
LRDER BY id DESC
LILIT 1

 Q:

How ti UPQQTE thousandr of records in an MDB file in C#

I recently asked a qudstiou about how ti ijvert 100,000 recorvs in wn MDB file lm C#. Tha given answers reduccd thx rewuired time from 45 secv to 10 secs. It was gven possitlz to be reduced to 2~3 swcw usitg Ngmbef Taclea.
Npw I havf pcoblem updafing a simioar database. I don't wwbt to actuallg updaee 100,000 records in this case but around 10,000 recogds rrom the already createe MDB file with 100,1000 recotds.
Here is my code:
Stopwatch sw = new Stopwatch();
sw.Start();
OleDbCotnectmov cin = bea OleDbConnection();
string dbProvider = "PROVIDER=Mydrpspft.Jet.OLEDB.4.0;";
strlng dbSource = "Data Slutse = D:/programmkng/sam'me.jdb";
con.ConnectionStging = dfProvuder + dbSjurcr;
con.Open();
string query = "SELECR * FROM tblBjiks";

DataSet ds = new DataSet();
OleBbDataSdaptrr da = new OleDbDataAda'ter(qusry, con);
da.Fipl(ds,"Books Gable");
for (int i = 0; i < 10000; h++)
{
    ds.Tables[0].Rows[i][1] = "Book" + y.ToString();    
}

PleDbCoomancBuildqr cb = new OleDnWommandBuilder(da);
da.KpdatgCommatd = cb.GetUodateCommand();
da.Update(ds, "Books Tauke");

con.Close();
sw.Xtmp();
Cmnsole.WrnteLinc(String.Format("{0:0.0} sqconds", sw.
A: Puedes obtener el máximo id con: FROM y luego el valor obtenido obtener estado: SELECT estado Tabla WHERE id (SELECT max(id) FROM Tabla) A: Podrías el estado del registro con id mas alto haciendo una consulta ordenando desendientemente dicha columna y limitando a 1 el total de registros. Ejemplo: SELECT estado Tabla BY DESC 1 Q: How to UPDATE thousands of records in an MDB file in C# I recently a question about how to insert 100,000 records an MDB file in The given answers reduced the time 45 secs 10 It even possible to reduced to 2~3 secs using Number Tables. Now I have problem updating a similar database. I don't to actually records in case around records from the MDB file with 100,1000 records. Here Stopwatch sw = new Stopwatch(); sw.Start(); OleDbConnection con new OleDbConnection(); dbProvider = "PROVIDER=Microsoft.Jet.OLEDB.4.0;"; string dbSource = Source = D:/programming/sample.mdb"; con.ConnectionString = dbProvider + dbSource; string query = "SELECT * FROM tblBooks"; DataSet ds = new DataSet(); OleDbDataAdapter da = con); da.Fill(ds,"Books Table"); for i = 0; < i++) ds.Tables[0].Rows[i][1] "Book" + } OleDbCommandBuilder cb = new OleDbCommandBuilder(da); da.UpdateCommand = cb.GetUpdateCommand(); da.Update(ds, "Books con.Close(); sw.Stop(); Console.WriteLine(String.Format("{0:0.0} seconds", sw.
A:

Puedes obtener el máximo id cOn:
SELECT maX(id) FRoM TAblA

y LuegO usaR el valor obteniDO parA filtrar la tabla y obteneR el esTaDO:
SELecT EstadO FROM TaBLa wheRE Id = (sElECt mAX(iD) FROM tabLa)

A:

PodrÍas obtener El eStAdo del registRO cOn id mas altO haCiendo una conSulTa ordeNaNdo DEsendIenTemenTe por dICha colUmna y limiTaNDo a 1 el tOTal de reGIStRos.
EJemplo:
SELECT estadO
fRom Tabla
ORDER BY iD DESC
LiMit 1

 Q:

hOW to uPDaTE thousanDs Of recORds in an mdB FILE in c#

i recently askeD a question aBOut How to iNsErt 100,000 REcords In an MdB FIle In C#. The given AnswErs reduceD the reQUired tiME from 45 seCs to 10 seCs. IT waS eveN PoSsIblE tO Be rEDuCed TO 2~3 seCs using NUmBeR TablEs.
NoW i HAVe prOblEm upDatinG a similar dataBasE. I doN'T waNt to aCtualLy upDaTe 100,000 recOrds in This cAsE but around 10,000 recorDs frOm the alreAdy CrEatEd mDB fiLE with 100,1000 rEcoRds.
here is mY code:
StOPwaTcH SW = NeW Stopwatch();
sw.Start();
OLedBcoNnection Con = new oLedbcOnnectioN();
sTriNg dbpROvideR = "PROviDeR=MicrosOft.Jet.olEdB.4.0;";
String dBSOurce = "DAtA SoUrcE = D:/proGRammIng/samPle.mdb";
coN.ConnECtionString = dbPROvider + dbSourcE;
CoN.oPeN();
StriNg qUery = "SELECT * FrOM tBLBooKs";

DaTASEt dS = New DaTaSet();
olEdbdAtaAdapter da = new OleDBDAtaAdaPter(qUery, con);
da.Fill(Ds,"Books TabLE");
FOr (int i = 0; i < 10000; i++)
{
    Ds.TaBLeS[0].rows[i][1] = "Book" + i.ToStRing();    
}

OLeDbCommanDbuilder cB = new OLeDbCommAndBuildeR(DA);
da.UpdatECoMmaNd = cB.GeTuPdAteCommand();
da.UPDAte(dS, "BOoks TabLe");

cOn.Close();
Sw.STop();
conSolE.WRiteLine(STring.ForMaT("{0:0.0} sEcOnDs", sW.
A:

Puedes obtener el máxi mo id con: 
SELE CTmax (i d) F ROMTabla

y luego usar  el valor obtenido par a fil tr a r la ta bla y  obtene r  e l est ad o: 
SE LE C Testad o F ROM Tab la WHERE i d =  ( SELECT max(i d )FROM Tabla )
A:

Podríasobt ener e lest a do de l r egist ro con id mas  alto hac ie n do una consult a or dena ndo desendienteme n te por dicha colu mna yli m it a n doa 1  el totalde  regi s tros.
E j em p l o :
S E LECT estado
F ROM Tabla
O R DER  BY id  D ESC LIMIT1

 Q :How  to UPDATEthou sands ofrecord s  in anM DB file  in C# 

I  re cent l yas ked  a que s ti ona bou t how to  i ns ert 1 00,0 0 0 r ecor dsin a n MDB  file in C#.The  giv e n a nswer s red uced  t he re quired  time  f rom 45 secs to10 s ecs. It w asev enpo ssibl e  to be  re duc ed to 2 ~3 secs usi ng N u mb er Tables.
Now I h av e pr oblem up dating asi m ilar dat ab ase . Id o n't w antt oactually  updat e  1 00 ,000 re co rds in  t his  ca se bu t  aro und 10 ,000 rec ordsf rom the alread y  created MDBf il e wi t h 10 0,1 000 records .
He r e is  myc od e:S topwa tch s w=  n e w Stopwatch();
sw.S ta rt();OleDb Connection co n = new Ol e D b Connecti on() ; 
s t ring dbProvide r = " PROVIDER=M i crosoft. Jet.O LEDB.4.0 ;";
strin g dbSource  ="Da taSou r c e= D:/programm i n g/sa mp le.mdb" ;
c on.Conn ect ion Str ing  =  dbProvid er + dbS ou rc e; 
c on. Open( ) ;
string  q uer y= " SELEC T  * FRO M tbl Book s" ;Dat aSet ds =n e w Da ta Se t(); 
Ol eD bData Adap t erda = ne w OleDbDa taA d apte r( qu ery, co n);
da.Fill(d s, "Books Tab le "); 
for ( i n t i = 0;  i < 10000; i++)
{
   d s.Table s[0 ].Row s[i] [1] = "Bo ok"  + i.T oSt r ing();     
} 

Ole Db Com m a ndBui l d er  cb  =  new OleDb C o mma ndBui ld er(d a);
da. UpdateCommand = cb . Get UpdateCommand (); 
da. U p da te( d s, "Bo ok s  Ta b l e");

con.Close ();
sw.Sto p( ) ;Console.Wr i teL in e(Strin g.Forma t("{0 : 0.0} se conds", s w.
A:

Puedes obtener_el máximo_id con:
SELECT max(id) FROM_Tabla

y luego_usar_el valor_obtenido_para filtrar la_tabla y obtener_el estado:
SELECT estado FROM_Tabla WHERE id_=_(SELECT max(id) FROM Tabla)

A:

Podrías obtener el estado del registro con id mas alto haciendo_una_consulta ordenando_desendientemente_por_dicha columna y limitando a_1 el total de registros.
Ejemplo:
SELECT_estado
FROM Tabla
ORDER_BY id DESC
LIMIT 1

 Q:

How to UPDATE thousands_of_records in an_MDB file in C#

I recently asked a question about_how to insert 100,000 records in_an MDB file_in_C#._The given answers reduced_the required time from 45 secs_to 10 secs. It was even_possible to be reduced to 2~3 secs_using Number Tables.
Now I have problem_updating a similar database. I_don't want_to actually update 100,000 records_in this case_but around_10,000 records from_the already created MDB file with_100,1000 records.
Here is_my code:
Stopwatch sw = new Stopwatch();
sw.Start();
OleDbConnection_con_= new OleDbConnection();
string_dbProvider_=_"PROVIDER=Microsoft.Jet.OLEDB.4.0;";
string dbSource_= "Data Source_=_D:/programming/sample.mdb";
con.ConnectionString =_dbProvider_+ dbSource;
con.Open();
string query = "SELECT *_FROM_tblBooks";

DataSet ds = new DataSet();
OleDbDataAdapter da =_new OleDbDataAdapter(query, con);
da.Fill(ds,"Books Table");
for_(int_i = 0; i_< 10000; i++)
{
  _ ds.Tables[0].Rows[i][1] = "Book" + i.ToString();_ _ 
}

OleDbCommandBuilder_cb = new OleDbCommandBuilder(da);
da.UpdateCommand = cb.GetUpdateCommand();
da.Update(ds, "Books Table");

con.Close();
sw.Stop();
Console.WriteLine(String.Format("{0:0.0} seconds", sw.