Det måste stå null i SQL-frågan, vilket innebär att du måste använda strängen null.
id sSetThisIdToMaster = "" then
sSetThisIdToMaster = "null"
end if
1 svar · 231 visningar · startad av mattiasnordin
Hej.
Jag har ett fält i en access 2003 databas som ska vara antingen null eller en siffra.
Nu undrar jag hur jag ändrar tillbaka till null efter att jag har satt en siffra.
Hur ser syntaxen ut? Måste det stå null i sql frågan eller går det att
id sSetThisIdToMaster = "" then
sSetThisIdToMaster = null
end if
sql_question = "INSERT INTO T_temp (sidan_html, huvud_meny_id, sub_meny_till_sida_id, fil_katalog_path, default_sida, lank_namn, visa_publikt, orginal_sida_id, site_id, sidan_uppdaterad_datum) "
sql_question = sql_question &" VALUES "
sql_question = sql_question &"('" &sHtmlSidan &"',"
sql_question = sql_question &"" &sHuvudMenyId &","
' sql_question = sql_question &"" &null&","
sql_question = sql_question &"" &sSetThisIdToMaster &","
sql_question = sql_question &"'',"
sql_question = sql_question &"'" &sDefaultSida &"',"
sql_question = sql_question &"'" &sLankNamn &"',"
sql_question = sql_question &"" &sVisaPublikt &","
sql_question = sql_question &"" &sValdSidaId &","
sql_question = sql_question &"" &sSiteId &","
sql_question = sql_question &"'" &now &"')"
response.write "<hr><b>DEBUG Insert ny text i skarpa databasen:</b> " &sql_question &"<hr>"
connect.execute(sql_question)
Det måste stå null i SQL-frågan, vilket innebär att du måste använda strängen null.
id sSetThisIdToMaster = "" then
sSetThisIdToMaster = "null"
end if