/
Forside
/
Teknologi
/
Udvikling
/
ASP
/
Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn
*
Kodeord
*
Husk mig
Brugerservice
Kom godt i gang
Bliv medlem
Seneste indlæg
Find en bruger
Stil et spørgsmål
Skriv et tip
Fortæl en ven
Pointsystemet
Kontakt Kandu.dk
Emnevisning
Kategorier
Alfabetisk
Karriere
Interesser
Teknologi
Reklame
Top 10 brugere
ASP
#
Navn
Point
1
smorch
9259
2
Harlekin
1866
3
molokyle
1040
4
Steffanst..
758
5
gandalf
657
6
smilly
564
7
gibson
560
8
cumano
530
9
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
Alle emner
Teknologi
Udvikling
ASP
Indstillinger
Spørgsmål
Tips
Usenet
Reklame
Statistik
Spørgsmål :
177556
Tips :
31968
Nyheder :
719565
Indlæg :
6408865
Brugere :
218888
Månedens bedste
Årets bedste
Sidste års bedste
Copyright © 2000-2024 kandu.dk. Alle rettigheder forbeholdes.