andyw
|
| Posted: 02/05/2003, 1:55 AM |
|
This is a multi-part message in MIME format.
------=_NextPart_000_0009_01C2CD05.1483AEA0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
Windows .net 2003 rc1 Built 3663 IIS 6.0 ASP, Access gives an error when =
updating or inserting records with memo fields
Source: Record artykuly / Update Operation
Command Text: UPDATE artykuly SET id_strony=3D1, kolumna=3D1, =
wiersz=3D1, tytul=3D'XX lecie ...', tresc=3D?, =
termin_waznosci=3D'2003-02-03 00:00:00', wprowadzajacy=3D1, =
data_wprowadzenia=3D'2003-01-05 00:00:00', autoryzujacy=3D5, =
data_autoryzacji=3D'2003-01-06 00:00:00' WHERE id_artukulu =3D 6
Error description: Operation must use an updateable query. (Microsoft =
JET Database Engine)
UPDATE artykuly SET id_strony=3D1, kolumna=3D1, wiersz=3D1, tytul=3D'XX =
lecie ...', tresc=3D?, termin_waznosci=3D'2003-02-03 00:00:00', =
wprowadzajacy=3D1, data_wprowadzenia=3D'2003-01-05 00:00:00', =
autoryzujacy=3D5, data_autoryzacji=3D'2003-01-06 00:00:00' WHERE =
id_artukulu =3D 6
On my design machine Windows XP everything runs smoothly.
The code that is to work to exchange the "?" sign seems to not to work =
on the server machine.
Hope you can give me some hints...
AndyW
------=_NextPart_000_0009_01C2CD05.1483AEA0
Content-Type: text/html;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-2">
<META content=3D"MSHTML 6.00.2715.400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2><STRONG>Windows .net 2003 rc1 Built =
3663 IIS=20
6.0 ASP, Access gives an error when updating or inserting records =
with memo=20
fields</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG></STRONG></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Source: Record artykuly / Update=20
Operation<BR>Command Text: UPDATE artykuly SET id_strony=3D1, =
kolumna=3D1, wiersz=3D1,=20
tytul=3D'XX lecie ...', <STRONG>tresc=3D?,</STRONG> =
termin_waznosci=3D'2003-02-03=20
00:00:00', wprowadzajacy=3D1, data_wprowadzenia=3D'2003-01-05 00:00:00', =
autoryzujacy=3D5, data_autoryzacji=3D'2003-01-06 00:00:00' WHERE =
id_artukulu =3D=20
6<BR>Error description: Operation must use an updateable query. =
(Microsoft JET=20
Database Engine)<BR>UPDATE artykuly SET id_strony=3D1, kolumna=3D1, =
wiersz=3D1,=20
tytul=3D'XX lecie ...', <STRONG>tresc=3D?,</STRONG> =
termin_waznosci=3D'2003-02-03=20
00:00:00', wprowadzajacy=3D1, data_wprowadzenia=3D'2003-01-05 00:00:00', =
autoryzujacy=3D5, data_autoryzacji=3D'2003-01-06 00:00:00' WHERE =
id_artukulu =3D=20
6<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>On my design machine Windows XP =
everything runs=20
smoothly.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>The code that is to work to =
exchange the=20
"?" sign seems to not to work on the server =
machine.</STRONG></FONT></DIV><FONT=20
face=3DArial size=3D2></FONT>
<DIV><BR><FONT face=3DArial size=3D2>Hope you can give me some =
hints...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>AndyW</FONT></DIV></BODY></HTML>
------=_NextPart_000_0009_01C2CD05.1483AEA0--
|
|
|
 |
DonB
|
| Posted: 02/17/2003, 2:41 PM |
|
This is a multi-part message in MIME format.
------=_NextPart_000_0042_01C2D6AB.D3FD74F0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
I frequently see the insert or udpate code being incorrectly generated. =
The array index that refers to the "parameter" associated with a memo =
field gets set to the wrong value. This may be what has happened to =
you. An example (although it's NOT .net) follows (this is in the "code" =
window of the CCS IDE):
'Insert Method @2-FD08D95F
Sub Insert(Cmd)
CCSEventResult =3D CCRaiseEvent(CCSEvents, "BeforeBuildInsert", =
Me)
Set Cmd.Connection =3D Connection
Cmd.CommandOperation =3D cmdExec
Cmd.CommandType =3D dsTable
Cmd.CommandParameters =3D Empty
Cmd.Prepared =3D True
With Cmd.Parameters
Set .Connection =3D Connection
Set .DataSource =3D Me
.AddParameter 1, "ctrlTextArea1", ccsMemo, Empty, Empty, =
Empty, False ' <---- Gets the memo data
End With
Cmd.SQL =3D "INSERT INTO BulkLoad(" & _
"LoadData" & _
") VALUES (" & _
"?" & _
")"
Cmd.CommandParameters =3D Array( _
Array("LoadData", adLongVarChar, adParamInput, 2147483647, _
Cmd.Parameters.getParamByID(1).SQLText) _ <- =
associates memo data with the "?" in the SQL statement
)
CCSEventResult =3D CCRaiseEvent(CCSEvents, =
"BeforeExecuteInsert", Me)
Cmd.Exec(Errors)
CCSEventResult =3D CCRaiseEvent(CCSEvents, "AfterExecuteInsert", =
Me)
End Sub
'End Insert Method
Although this example IS CORRECT, the place where the code gets messed =
up is at "Cmd.Parameters.getParamByID(1).SQLText". The problem occurs =
when the value array index (1)is incorrectly set to something other than =
(1). When compared with the ".AddParameter 1,..." farther up in the =
code, the mismatch is easily recognizable when it occurs. =20
Often, this problem does not create a runtime error, however it =
manifests itself by storing the wrong data values into the memo field =
(possibly left blank because the getParam selects an empty textfield as =
the value written to the memofield).
For awhile I thought CCS was just not writing the memo fields to the =
database, but then I found out it was writing a value, but the value =
happened to be "null".
I reported this to Yes almost a year ago.
DonB
"andyw" <a.wisniewski@interia.pl> wrote in message =
news:b1qn2a$qr1$1@news.codecharge.com...
Windows .net 2003 rc1 Built 3663 IIS 6.0 ASP, Access gives an error =
when updating or inserting records with memo fields
Source: Record artykuly / Update Operation
Command Text: UPDATE artykuly SET id_strony=3D1, kolumna=3D1, =
wiersz=3D1, tytul=3D'XX lecie ...', tresc=3D?, =
termin_waznosci=3D'2003-02-03 00:00:00', wprowadzajacy=3D1, =
data_wprowadzenia=3D'2003-01-05 00:00:00', autoryzujacy=3D5, =
data_autoryzacji=3D'2003-01-06 00:00:00' WHERE id_artukulu =3D 6
Error description: Operation must use an updateable query. (Microsoft =
JET Database Engine)
UPDATE artykuly SET id_strony=3D1, kolumna=3D1, wiersz=3D1, =
tytul=3D'XX lecie ...', tresc=3D?, termin_waznosci=3D'2003-02-03 =
00:00:00', wprowadzajacy=3D1, data_wprowadzenia=3D'2003-01-05 00:00:00', =
autoryzujacy=3D5, data_autoryzacji=3D'2003-01-06 00:00:00' WHERE =
id_artukulu =3D 6
On my design machine Windows XP everything runs smoothly.
The code that is to work to exchange the "?" sign seems to not to work =
on the server machine.
Hope you can give me some hints...
AndyW
------=_NextPart_000_0042_01C2D6AB.D3FD74F0
Content-Type: text/html;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-2">
<META content=3D"MSHTML 6.00.2800.1126" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I frequently see the insert or udpate =
code being=20
incorrectly generated. The array index that refers to the =
"parameter"=20
associated with a memo field gets set to the wrong value. This may =
be what=20
has happened to you. An example (although it's NOT .net) follows =
(this is=20
in the "code" window of the CCS IDE):</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>'Insert Method =
@2-FD08D95F<BR> =20
Sub Insert(Cmd)<BR> =
CCSEventResult =3D=20
CCRaiseEvent(CCSEvents, "BeforeBuildInsert",=20
Me)<BR> Set Cmd.Connection =3D =
Connection<BR> =
Cmd.CommandOperation =3D=20
cmdExec<BR> Cmd.CommandType =
=3D=20
dsTable<BR> =
Cmd.CommandParameters =3D=20
Empty<BR> Cmd.Prepared =3D=20
True<BR> With=20
Cmd.Parameters<BR> &=
nbsp; =20
Set .Connection =3D=20
Connection<BR>  =
; =20
Set .DataSource =3D=20
Me<BR> =
..AddParameter 1, "ctrlTextArea1", ccsMemo, Empty, Empty, Empty, =
False =20
' <---- Gets the memo=20
data<BR> End=20
With<BR> Cmd.SQL =3D "INSERT =
INTO=20
BulkLoad(" &=20
_<BR> =20
"LoadData" & _<BR> ") =
VALUES ("=20
& =
_<BR> =20
"?" & _<BR> =20
")"<BR> Cmd.CommandParameters =
=3D Array(=20
_<BR> =20
Array("LoadData", adLongVarChar, adParamInput, 2147483647, =
_</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =20
Cmd.Parameters.getParamByID(1).SQLText)=20
_ <- associates memo data =
with the=20
"?" in the SQL statement<BR> =20
)<BR> CCSEventResult =3D=20
CCRaiseEvent(CCSEvents, "BeforeExecuteInsert",=20
Me)<BR> =20
Cmd.Exec(Errors)<BR> =
CCSEventResult =3D=20
CCRaiseEvent(CCSEvents, "AfterExecuteInsert", Me)<BR> =
End=20
Sub<BR>'End Insert Method<BR></DIV></FONT>
<DIV><FONT face=3DArial size=3D2>Although this example IS CORRECT, the =
place where=20
the code gets messed up is at =
"Cmd.Parameters.getParamByID(1).SQLText". =20
The problem occurs when the value array index (1)is incorrectly set to =
something=20
other than (1). When compared with the ".AddParameter 1,..." =
farther up in=20
the code, the mismatch is easily recognizable when it occurs. =20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Often, this problem does not create a =
runtime=20
error, however it manifests itself by storing the wrong data values into =
the=20
memo field (possibly left blank because the getParam selects an empty =
textfield=20
as the value written to the memofield).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>For awhile I thought CCS was just not =
writing the=20
memo fields to the database, but then I found out it was writing a =
value, but=20
the value happened to be "null".</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I reported this to Yes almost a year=20
ago.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>DonB</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV>"andyw" <<A=20
href=3D"mailto:a.wisniewski@interia.pl">a.wisniewski@interia.pl</A>> =
wrote in=20
message <A=20
href=3D"news:b1qn2a$qr1$1@news.codecharge.com">news:b1qn2a$qr1$1@news.cod=
echarge.com</A>...</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=3DArial size=3D2><STRONG>Windows .net 2003 rc1 Built =
3663 IIS=20
6.0 ASP, Access gives an error when updating or inserting records =
with=20
memo fields</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG></STRONG></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Source: Record artykuly / Update=20
Operation<BR>Command Text: UPDATE artykuly SET id_strony=3D1, =
kolumna=3D1,=20
wiersz=3D1, tytul=3D'XX lecie ...', <STRONG>tresc=3D?,</STRONG>=20
termin_waznosci=3D'2003-02-03 00:00:00', wprowadzajacy=3D1,=20
data_wprowadzenia=3D'2003-01-05 00:00:00', autoryzujacy=3D5,=20
data_autoryzacji=3D'2003-01-06 00:00:00' WHERE id_artukulu =3D =
6<BR>Error=20
description: Operation must use an updateable query. (Microsoft JET =
Database=20
Engine)<BR>UPDATE artykuly SET id_strony=3D1, kolumna=3D1, wiersz=3D1, =
tytul=3D'XX=20
lecie ...', <STRONG>tresc=3D?,</STRONG> termin_waznosci=3D'2003-02-03 =
00:00:00',=20
wprowadzajacy=3D1, data_wprowadzenia=3D'2003-01-05 00:00:00', =
autoryzujacy=3D5,=20
data_autoryzacji=3D'2003-01-06 00:00:00' WHERE id_artukulu =3D =
6<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>On my design machine Windows XP =
everything runs=20
smoothly.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>The code that is to work to =
exchange the=20
"?" sign seems to not to work on the server=20
machine.</STRONG></FONT></DIV><FONT face=3DArial size=3D2></FONT>
<DIV><BR><FONT face=3DArial size=3D2>Hope you can give me some=20
hints...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial =
size=3D2>AndyW</FONT></DIV></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0042_01C2D6AB.D3FD74F0--
|
|
|
 |
andyw
|
| Posted: 02/17/2003, 11:53 PM |
|
This is a multi-part message in MIME format.
------=_NextPart_000_0035_01C2D72B.35F9E3D0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
Thanks DonB,
As I understand I have to ensure for the =
Cmd.Parameters.getParamByID(1).SQLText) _ to be a real 1 in the =
code.
I will try to work out and answer you.
AndyW
"DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message =
news:b2rof2$h79$1@news.codecharge.com...
I frequently see the insert or udpate code being incorrectly =
generated. The array index that refers to the "parameter" associated =
with a memo field gets set to the wrong value. This may be what has =
happened to you. An example (although it's NOT .net) follows (this is =
in the "code" window of the CCS IDE):
'Insert Method @2-FD08D95F
Sub Insert(Cmd)
CCSEventResult =3D CCRaiseEvent(CCSEvents, =
"BeforeBuildInsert", Me)
Set Cmd.Connection =3D Connection
Cmd.CommandOperation =3D cmdExec
Cmd.CommandType =3D dsTable
Cmd.CommandParameters =3D Empty
Cmd.Prepared =3D True
With Cmd.Parameters
Set .Connection =3D Connection
Set .DataSource =3D Me
.AddParameter 1, "ctrlTextArea1", ccsMemo, Empty, Empty, =
Empty, False ' <---- Gets the memo data
End With
Cmd.SQL =3D "INSERT INTO BulkLoad(" & _
"LoadData" & _
") VALUES (" & _
"?" & _
")"
Cmd.CommandParameters =3D Array( _
Array("LoadData", adLongVarChar, adParamInput, 2147483647, =
_
Cmd.Parameters.getParamByID(1).SQLText) _ <- =
associates memo data with the "?" in the SQL statement
)
CCSEventResult =3D CCRaiseEvent(CCSEvents, =
"BeforeExecuteInsert", Me)
Cmd.Exec(Errors)
CCSEventResult =3D CCRaiseEvent(CCSEvents, =
"AfterExecuteInsert", Me)
End Sub
'End Insert Method
Although this example IS CORRECT, the place where the code gets messed =
up is at "Cmd.Parameters.getParamByID(1).SQLText". The problem occurs =
when the value array index (1)is incorrectly set to something other than =
(1). When compared with the ".AddParameter 1,..." farther up in the =
code, the mismatch is easily recognizable when it occurs. =20
Often, this problem does not create a runtime error, however it =
manifests itself by storing the wrong data values into the memo field =
(possibly left blank because the getParam selects an empty textfield as =
the value written to the memofield).
For awhile I thought CCS was just not writing the memo fields to the =
database, but then I found out it was writing a value, but the value =
happened to be "null".
I reported this to Yes almost a year ago.
DonB
"andyw" <a.wisniewski@interia.pl> wrote in message =
news:b1qn2a$qr1$1@news.codecharge.com...
Windows .net 2003 rc1 Built 3663 IIS 6.0 ASP, Access gives an error =
when updating or inserting records with memo fields
Source: Record artykuly / Update Operation
Command Text: UPDATE artykuly SET id_strony=3D1, kolumna=3D1, =
wiersz=3D1, tytul=3D'XX lecie ...', tresc=3D?, =
termin_waznosci=3D'2003-02-03 00:00:00', wprowadzajacy=3D1, =
data_wprowadzenia=3D'2003-01-05 00:00:00', autoryzujacy=3D5, =
data_autoryzacji=3D'2003-01-06 00:00:00' WHERE id_artukulu =3D 6
Error description: Operation must use an updateable query. =
(Microsoft JET Database Engine)
UPDATE artykuly SET id_strony=3D1, kolumna=3D1, wiersz=3D1, =
tytul=3D'XX lecie ...', tresc=3D?, termin_waznosci=3D'2003-02-03 =
00:00:00', wprowadzajacy=3D1, data_wprowadzenia=3D'2003-01-05 00:00:00', =
autoryzujacy=3D5, data_autoryzacji=3D'2003-01-06 00:00:00' WHERE =
id_artukulu =3D 6
On my design machine Windows XP everything runs smoothly.
The code that is to work to exchange the "?" sign seems to not to =
work on the server machine.
Hope you can give me some hints...
AndyW
------=_NextPart_000_0035_01C2D72B.35F9E3D0
Content-Type: text/html;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-2">
<META content=3D"MSHTML 6.00.2715.400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Thanks DonB,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>As I understand I have to ensure for =
the=20
Cmd.Parameters.getParamByID(1).SQLText) =
_ to=20
be a real 1 in the code.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I will try to work out and answer =
you.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>AndyW</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"DonB" <<A=20
=
href=3D"mailto:7432D63DBB01D03A196B1EDD80E8@comcast.net">7432D63DBB01D03A=
196B1EDD80E8@comcast.net</A>>=20
wrote in message <A=20
=
href=3D"news:b2rof2$h79$1@news.codecharge.com">news:b2rof2$h79$1@news.cod=
echarge.com</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>I frequently see the insert or udpate =
code being=20
incorrectly generated. The array index that refers to the =
"parameter"=20
associated with a memo field gets set to the wrong value. This =
may be=20
what has happened to you. An example (although it's NOT .net) =
follows=20
(this is in the "code" window of the CCS IDE):</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>'Insert Method =
@2-FD08D95F<BR> =20
Sub Insert(Cmd)<BR> =
CCSEventResult =3D=20
CCRaiseEvent(CCSEvents, "BeforeBuildInsert",=20
Me)<BR> Set Cmd.Connection =
=3D=20
Connection<BR> =
Cmd.CommandOperation=20
=3D cmdExec<BR> =
Cmd.CommandType =3D=20
dsTable<BR> =
Cmd.CommandParameters =3D=20
Empty<BR> Cmd.Prepared =3D=20
True<BR> With=20
=
Cmd.Parameters<BR> &=
nbsp; =20
Set .Connection =3D=20
=
Connection<BR>  =
; =20
Set .DataSource =3D=20
=
Me<BR> =
.AddParameter 1, "ctrlTextArea1", ccsMemo, Empty, Empty, Empty, =
False =20
' <---- Gets the memo=20
data<BR> End=20
With<BR> Cmd.SQL =3D "INSERT =
INTO=20
BulkLoad(" &=20
=
_<BR> =20
"LoadData" & _<BR> ") =
VALUES ("=20
& =
_<BR> =20
"?" & _<BR> =20
")"<BR> =
Cmd.CommandParameters =3D=20
Array( =
_<BR> =20
Array("LoadData", adLongVarChar, adParamInput, 2147483647, =
_</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
Cmd.Parameters.getParamByID(1).SQLText)=20
_ <- associates memo data =
with the=20
"?" in the SQL statement<BR> =
)<BR> CCSEventResult =3D=20
CCRaiseEvent(CCSEvents, "BeforeExecuteInsert",=20
Me)<BR> =20
Cmd.Exec(Errors)<BR> =
CCSEventResult=20
=3D CCRaiseEvent(CCSEvents, "AfterExecuteInsert", =
Me)<BR> End=20
Sub<BR>'End Insert Method<BR></DIV></FONT>
<DIV><FONT face=3DArial size=3D2>Although this example IS CORRECT, the =
place where=20
the code gets messed up is at =
"Cmd.Parameters.getParamByID(1).SQLText". =20
The problem occurs when the value array index (1)is incorrectly set to =
something other than (1). When compared with the ".AddParameter =
1,..."=20
farther up in the code, the mismatch is easily recognizable when it=20
occurs. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Often, this problem does not create a =
runtime=20
error, however it manifests itself by storing the wrong data values =
into the=20
memo field (possibly left blank because the getParam selects an empty=20
textfield as the value written to the memofield).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>For awhile I thought CCS was just not =
writing the=20
memo fields to the database, but then I found out it was writing a =
value, but=20
the value happened to be "null".</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I reported this to Yes almost a year=20
ago.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>DonB</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV>"andyw" <<A=20
=
href=3D"mailto:a.wisniewski@interia.pl">a.wisniewski@interia.pl</A>> =
wrote in=20
message <A=20
=
href=3D"news:b1qn2a$qr1$1@news.codecharge.com">news:b1qn2a$qr1$1@news.cod=
echarge.com</A>...</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=3DArial size=3D2><STRONG>Windows .net 2003 rc1 Built =
3663 IIS=20
6.0 ASP, Access gives an error when updating or inserting =
records with=20
memo fields</STRONG></FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2><STRONG></STRONG></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Source: Record artykuly / Update=20
Operation<BR>Command Text: UPDATE artykuly SET id_strony=3D1, =
kolumna=3D1,=20
wiersz=3D1, tytul=3D'XX lecie ...', <STRONG>tresc=3D?,</STRONG>=20
termin_waznosci=3D'2003-02-03 00:00:00', wprowadzajacy=3D1,=20
data_wprowadzenia=3D'2003-01-05 00:00:00', autoryzujacy=3D5,=20
data_autoryzacji=3D'2003-01-06 00:00:00' WHERE id_artukulu =3D =
6<BR>Error=20
description: Operation must use an updateable query. (Microsoft JET =
Database=20
Engine)<BR>UPDATE artykuly SET id_strony=3D1, kolumna=3D1, =
wiersz=3D1, tytul=3D'XX=20
lecie ...', <STRONG>tresc=3D?,</STRONG> =
termin_waznosci=3D'2003-02-03 00:00:00',=20
wprowadzajacy=3D1, data_wprowadzenia=3D'2003-01-05 00:00:00', =
autoryzujacy=3D5,=20
data_autoryzacji=3D'2003-01-06 00:00:00' WHERE id_artukulu =3D=20
6<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>On my design machine Windows XP =
everything runs=20
smoothly.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>The code that is to work to =
exchange=20
the "?" sign seems to not to work on the server=20
machine.</STRONG></FONT></DIV><FONT face=3DArial size=3D2></FONT>
<DIV><BR><FONT face=3DArial size=3D2>Hope you can give me some=20
hints...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial=20
size=3D2>AndyW</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0035_01C2D72B.35F9E3D0--
|
|
|
 |
|