Hi Sergy, why would asprunner compiler duplicate a field, the field is for an image LongBlob in mysql and is the only duplicate. It is duplicated in add and edit. This is using Build 92 and older versions. After I removed the duplicates it would add a picture with a new record but did not change the picture in edit mode. It would appear to download and update the record, but would not update the picture. I later discovered the field name was assetpic and is case sensitive. I earlier changed the field name from AssetPic to assetpic and for some reason the compiler was not updating. Since I renamed the field back to AssetPic it allows me to update the picture, but it still continues to duplicate when I recompile.
if RemoveWrappers("Unit")="AssetPic" then
bAddMasterKey = false
end if
if IsUpdatable(rs.Fields("AssetPic")) then
nType = GetFieldType(strTableName, "AssetPic")
' boolean
if GetEditFormat("AssetPic")=EDIT_FORMAT_CHECKBOX or (nType=131 and Left(GetRequestForm("AssetPic"),1)="o") then
if GetRequestForm("AssetPic")="on" then
strValue="1"
else
strValue="0"
end if
else ' not boolean
if GetRequestForm("AssetPic")="" and ( nType=72 or nType=133 or nType=134 or nType=135 ) then
strValue = NULL
else
strValue=GetRequestForm("AssetPic")
' date edit convert
if GetEditFormat("AssetPic")=EDIT_FORMAT_DATE or IsDateFieldType(nType) then
strValue= FormatDbDate(strValue, DateEditType("AssetPic"))
end if
if IfNeedQuotes(GetFieldType(strTableName, "AssetPic"))<>"True" or IsDateFieldType(GetFieldType(strTableName, "AssetPic")) then
if strValue="" then
strValue=Null
end if
end if
if IsFloat(nType) and strValue<>"" then
strValue = CSmartDbl(strValue)
end if
end if
end if
dict.Add "AssetPic", strValue
end if
if RemoveWrappers("Unit")="AssetPic" then
bAddMasterKey = false
end if
if IsUpdatable(rs.Fields("AssetPic")) then
nType = GetFieldType(strTableName, "AssetPic")
' boolean
if GetEditFormat("AssetPic")=EDIT_FORMAT_CHECKBOX or (nType=131 and Left(GetRequestForm("AssetPic"),1)="o") then
if GetRequestForm("AssetPic")="on" then
strValue="1"
else
strValue="0"
end if
else ' not boolean
if GetRequestForm("AssetPic")="" and ( nType=72 or nType=133 or nType=134 or nType=135 ) then
strValue = NULL
else
strValue=GetRequestForm("AssetPic")
' date edit convert
if GetEditFormat("AssetPic")=EDIT_FORMAT_DATE or IsDateFieldType(nType) then
strValue= FormatDbDate(strValue, DateEditType("AssetPic"))
end if
if IfNeedQuotes(GetFieldType(strTableName, "AssetPic"))<>"True" or IsDateFieldType(GetFieldType(strTableName, "AssetPic")) then
if strValue="" then
strValue=Null
end if
end if
if IsFloat(nType) and strValue<>"" then
strValue = CSmartDbl(strValue)
end if
end if
end if
dict.Add "AssetPic", strValue
end if
if IsUpdatable(rs.Fields("AssetPic")) then
nType = GetFieldType(strTableName, "AssetPic")
strValue=dict("AssetPic")
if GetEditFormat("AssetPic")=EDIT_FORMATFILE then
if GetRequestForm("typeAssetPic") = "upload2" then
rs("AssetPic")= strValue
if strValue<>"" then
WriteToFile Server.MapPath(GetUploadFolder("AssetPic") & strValue), GetRequestForm("fileAssetPic")
end if
elseif GetEditFormat("AssetPic")<>FORMAT_DATABASE_IMAGE and GetEditFormat("AssetPic")<>FORMAT_DATABASE_FILE then
if IsFloat(nType) and strValue<>"" then
rs("AssetPic") = CSmartDbl(strValue)
else
rs("AssetPic") = strValue
end if
else
if GetRequestForm("typeAssetPic") = "file1" or GetRequestForm("typeAssetPic") = "file2" then
If IsNull(strValue) or GetRequestForm("typeAssetPic") = "file1" Then
rs("AssetPic") = Null
Else
rs("AssetPic").AppendChunk strValue
End If
end if
end if
end if
if IsUpdatable(rs.Fields("AssetPic")) then
nType = GetFieldType(strTableName, "AssetPic")
strValue=dict("AssetPic")
if GetEditFormat("AssetPic")=EDIT_FORMATFILE then
if GetRequestForm("typeAssetPic") = "upload2" then
rs("AssetPic")= strValue
if strValue<>"" then
WriteToFile Server.MapPath(GetUploadFolder("AssetPic") & strValue), GetRequestForm("fileAssetPic")
end if
elseif GetEditFormat("AssetPic")<>FORMAT_DATABASE_IMAGE and GetEditFormat("AssetPic")<>FORMAT_DATABASE_FILE then
if IsFloat(nType) and strValue<>"" then
rs("AssetPic") = CSmartDbl(strValue)
else
rs("AssetPic") = strValue
end if
else
if GetRequestForm("typeAssetPic") = "file1" or GetRequestForm("typeAssetPic") = "file2" then
If IsNull(strValue) or GetRequestForm("typeAssetPic") = "file1" Then
rs("AssetPic") = Null
Else
rs("AssetPic").AppendChunk strValue
End If
end if
end if
end if
I also noticed the connection string gets longer each time I recompile
<%
strConnection = "DSN=MyServices;UID=;PWD=DATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypasswo
rd;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UI
D=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABA
SE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN
=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;
OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD
=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;
PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=r
ootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=
mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=My
Services;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPT
ION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=my
password;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;POR
T=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=root
DATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mys
ql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MySer
vices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION
=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypas
sword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0
;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDAT
ABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;
DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServic
es;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;
PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypasswo
rd;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UI
D=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABA
SE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN
=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;
OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD
=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;
PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=r
ootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=
mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=My
Services;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPT
ION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=my
password;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;POR
T=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=root
DATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mys
ql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MySer
vices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION
=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypas
sword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0
;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDAT
ABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;
DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServic
es;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;
PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypasswo
rd;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UI
D=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABA
SE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN
=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;
OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD
=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;
PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=r
ootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=
mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=My
Services;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPT
ION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=my
password;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;POR
T=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=root
DATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mys
ql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MySer
vices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION
=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypas
sword;PORT=0;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0
;UID=rootDATABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDAT
ABASE=mysql;DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=rootDATABASE=mysql;
DSN=MyServices;OPTION=3;PWD=mypassword;PORT=0;UID=root"
%>