/ Forside / Teknologi / Udvikling / ASP / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
ASP
#NavnPoint
smorch 9259
Harlekin 1866
molokyle 1040
Steffanst.. 758
gandalf 657
smilly 564
gibson 560
cumano 530
MouseKeep.. 480
10  Random 410
problem updating db
Fra : Blankspace Steven


Dato : 21-05-01 20:50

Hallo all!


I have problems updating an Access database, with one recordset it
works, with otherone it doesn't...

When I call the function addPoints(pointArray) it does it's thing
and the db get's updated...
But when I call addBox() I get following err:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
Query based update failed. The row to update could not be found.

Here is the main code:

var strProvider="DRIVER=Microsoft Access Driver (*.mdb);" + "DBQ=D:
\\WWWroot\\Snst\\SVGeditor\\"+Application("DBase");
   var strSQL1='SELECT * FROM VSPLINE';
   var strSQL2='SELECT * FROM VSVERTEX';

   var CSVCon = Server.CreateObject("ADODB.Connection");
   CSVCon.Open(strProvider);

   var PLineData= Server.CreateObject("ADODB.Recordset");
   PLineData.CursorType = 0;
   PLineData.CursorLocation = 2;
   PLineData.LockType = 3;
   PLineData.Open(strSQL1, CSVCon);


   var PointData= Server.CreateObject("ADODB.Recordset");
   PointData.CursorType = 0;
   PointData.CursorLocation = 2;
   PointData.LockType = 3;
   PointData.Open(strSQL2, CSVCon);

   PLineData.Movefirst();
   PointData.Movefirst();


function addBox()
{
   getMaxMin();
   PLineData("handle") = Counter + "";
   PLineData("min_x") = Min_X;
   PLineData("min_y") = Min_Y;
   PLineData("max_x") = Max_X;
   PLineData("max_y") = Max_Y;
   PLineData.Update();
   PLineData.MoveNext();
}

function addPoints(pointArray)
{
   PointData.Fields("handle") = Counter+"";
   PointData("vseq") = seq++;
   PointData("x") = pointArray[1];
   PointData("y") = pointArray[2];
   PointData.Update();
   PointData.MoveNext();

   PointData("handle") = Counter+"";
   PointData("vseq") = seq++;
   PointData("x") = pointArray[3];
   PointData("y") = pointArray[4];
   PointData.Update();
   PointData.MoveNext();
}


Hope someone can help...

Regards,
Steven



 
 
Søg
Reklame
Statistik
Spørgsmål : 177556
Tips : 31968
Nyheder : 719565
Indlæg : 6408865
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste