Hi all
I use the following code below to insert Datas in a sql Database received from a asp Page
------------------------------------------------------------
' Open Connection to the database
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open xDb_Conn_Str
Select Case a
Case "C": ' Get a record to display
tkey = "" & key & ""
strsql = "SELECT * FROM [Kunden] WHERE [ID]=" & tkey
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql, conn
If rs.Eof Then
Response.Clear
Response.Redirect "Kundenlist.asp"
Else
rs.MoveFirst
' Get the field contents
x_ID = rs("ID")
x_Domain = rs("Domain")
x_TLD = rs("TLD")
x_LoginName = rs("LoginName")
x_Passwort = rs("Passwort")
x_Service = rs("Service")
x_Kundennummer = rs("Kundennummer")
x_FK_ID_Server = rs("FK_ID_Server")
x_Erfasst_am = rs("Erfasst_am")
x_gesperrt = rs("gesperrt")
x_Bemerkungen = rs("Bemerkungen")
x_alte_infos = rs("alte_infos")
x_alg_infos = rs("alg_infos")
x_best_anm = rs("best_anm")
x_Reseller = rs("Reseller")
x_Reseller_nummer = rs("Reseller_nummer")
x_Anrede_best = rs("Anrede_best")
x_Firma_best = rs("Firma_best")
x_Nname_best = rs("Nname_best")
x_Vorname_best = rs("Vorname_best")
x_Strasse_best = rs("Strasse_best")
x_Postfach_best = rs("Postfach_best")
x_PLZ_best = rs("PLZ_best")
x_Ort_best = rs("Ort_best")
x_Telefon_best = rs("Telefon_best")
x_Fax_best = rs("Fax_best")
x_Land_best = rs("Land_best")
x_Email_best = rs("Email_best")
x_Anrede_re = rs("Anrede_re")
x_Firma_re = rs("Firma_re")
x_Nname_re = rs("Nname_re")
x_Vorname_re = rs("Vorname_re")
x_Strasse_re = rs("Strasse_re")
x_Postfach_re = rs("Postfach_re")
x_PLZ_re = rs("PLZ_re")
x_Ort_re = rs("Ort_re")
x_Telefon_re = rs("Telefon_re")
x_Fax_re = rs("Fax_re")
x_Land_re = rs("Land_re")
x_Email_re = rs("Email_re")
x_Anrede_tec = rs("Anrede_tec")
x_Firma_tec = rs("Firma_tec")
x_Nname_tec = rs("Nname_tec")
x_Vorname_tec = rs("Vorname_tec")
x_Strasse_tec = rs("Strasse_tec")
x_Postfach_tec = rs("Postfach_tec")
x_PLZ_tec = rs("PLZ_tec")
x_Ort_tec = rs("Ort_tec")
x_Telefon_tec = rs("Telefon_tec")
x_Fax_tec = rs("Fax_tec")
x_Land_tec = rs("Land_tec")
x_Email_tec = rs("Email_tec")
x_Kontrolliert = rs("Kontrolliert")
x_erfasst_durch = rs("erfasst_durch")
x_MXrecord = rs("MXrecord")
x_Survey = rs("Survey")
x_sperrdatum = rs("sperrdatum")
x_Domainreg = rs("Domainreg")
End If
rs.Close
Set rs = Nothing
Case "A": ' Add
' Get fields from form
x_ID = Request.Form("x_ID")
x_Domain = Request.Form("x_Domain")
x_TLD = Request.Form("x_TLD")
x_LoginName = Request.Form("x_LoginName")
x_Passwort = Request.Form("x_Passwort")
x_Service = Request.Form("x_Service")
x_Kundennummer = Request.Form("x_Kundennummer")
x_FK_ID_Server = Request.Form("x_FK_ID_Server")
x_Erfasst_am = Request.Form("x_Erfasst_am")
x_gesperrt = Request.Form("x_gesperrt")
x_Bemerkungen = Request.Form("x_Bemerkungen")
x_alte_infos = Request.Form("x_alte_infos")
x_alg_infos = Request.Form("x_alg_infos")
x_best_anm = Request.Form("x_best_anm")
x_Reseller = Request.Form("x_Reseller")
x_Reseller_nummer = Request.Form("x_Reseller_nummer")
x_Anrede_best = Request.Form("x_Anrede_best")
x_Firma_best = Request.Form("x_Firma_best")
x_Nname_best = Request.Form("x_Nname_best")
x_Vorname_best = Request.Form("x_Vorname_best")
x_Strasse_best = Request.Form("x_Strasse_best")
x_Postfach_best = Request.Form("x_Postfach_best")
x_PLZ_best = Request.Form("x_PLZ_best")
x_Ort_best = Request.Form("x_Ort_best")
x_Telefon_best = Request.Form("x_Telefon_best")
x_Fax_best = Request.Form("x_Fax_best")
x_Land_best = Request.Form("x_Land_best")
x_Email_best = Request.Form("x_Email_best")
x_Anrede_re = Request.Form("x_Anrede_re")
x_Firma_re = Request.Form("x_Firma_re")
x_Nname_re = Request.Form("x_Nname_re")
x_Vorname_re = Request.Form("x_Vorname_re")
x_Strasse_re = Request.Form("x_Strasse_re")
x_Postfach_re = Request.Form("x_Postfach_re")
x_PLZ_re = Request.Form("x_PLZ_re")
x_Ort_re = Request.Form("x_Ort_re")
x_Telefon_re = Request.Form("x_Telefon_re")
x_Fax_re = Request.Form("x_Fax_re")
x_Land_re = Request.Form("x_Land_re")
x_Email_re = Request.Form("x_Email_re")
x_Anrede_tec = Request.Form("x_Anrede_tec")
x_Firma_tec = Request.Form("x_Firma_tec")
x_Nname_tec = Request.Form("x_Nname_tec")
x_Vorname_tec = Request.Form("x_Vorname_tec")
x_Strasse_tec = Request.Form("x_Strasse_tec")
x_Postfach_tec = Request.Form("x_Postfach_tec")
x_PLZ_tec = Request.Form("x_PLZ_tec")
x_Ort_tec = Request.Form("x_Ort_tec")
x_Telefon_tec = Request.Form("x_Telefon_tec")
x_Fax_tec = Request.Form("x_Fax_tec")
x_Land_tec = Request.Form("x_Land_tec")
x_Email_tec = Request.Form("x_Email_tec")
x_Kontrolliert = Request.Form("x_Kontrolliert")
x_erfasst_durch = Request.Form("x_erfasst_durch")
x_MXrecord = Request.Form("x_MXrecord")
x_Survey = Request.Form("x_Survey")
x_sperrdatum = Request.Form("x_sperrdatum")
x_Domainreg = Request.Form("x_Domainreg")
x_InhRe = Request.Form("x_InhRe")
' Open record
strsql = "SELECT * FROM [Kunden] WHERE 0 = 1"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql, conn, 1, 2
rs.AddNew
tmpFld = x_ID
If Not IsNumeric(tmpFld) Then tmpFld = 0
srchFld = tmpFld
strsql = "SELECT * FROM [Kunden] WHERE [ID] = " & srchFld
Set rschk = conn.Execute(strsql)
If Not rschk.Eof Then
Response.Write "Achtung doppelte Laufnummer -- ID, value = " & tmpFld & "<br>"
Response.Write "Im Browser auf zurückklicken und nochmals versuchen!"
Response.End
End If
rschk.Close
Set rschk = Nothing
rs("ID") = CLng(tmpFld)
tmpFld = Trim(x_Domain)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Domain") = tmpFld
tmpFld = Trim(x_TLD)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("TLD") = tmpFld
tmpFld = Trim(x_LoginName)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("LoginName") = tmpFld
tmpFld = Trim(x_Passwort)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Passwort") = tmpFld
tmpFld = Trim(x_Service)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Service") = tmpFld
tmpFld = Trim(x_Kundennummer)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Kundennummer") = tmpFld
tmpFld = Trim(x_FK_ID_Server)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("FK_ID_Server") = tmpFld
tmpFld = x_Erfasst_am
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Erfasst_am") = CLng(tmpFld)
tmpFld = x_gesperrt
If tmpFld = "1" Then
rs("gesperrt") = True
Else
rs("gesperrt") = False
End If
tmpFld = Trim(x_Bemerkungen)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Bemerkungen") = tmpFld
tmpFld = Trim(x_alte_infos)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("alte_infos") = tmpFld
tmpFld = Trim(x_alg_infos)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("alg_infos") = tmpFld
tmpFld = Trim(x_best_anm)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("best_anm") = tmpFld
tmpFld = x_Reseller
If tmpFld = "1" Then
rs("Reseller") = True
Else
rs("Reseller") = False
End If
tmpFld = Trim(x_Reseller_nummer)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Reseller_nummer") = tmpFld
tmpFld = Trim(x_Anrede_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Anrede_best") = tmpFld
tmpFld = Trim(x_Firma_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Firma_best") = tmpFld
tmpFld = Trim(x_Nname_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Nname_best") = tmpFld
tmpFld = Trim(x_Vorname_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Vorname_best") = tmpFld
tmpFld = Trim(x_Strasse_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Strasse_best") = tmpFld
tmpFld = Trim(x_Postfach_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Postfach_best") = tmpFld
tmpFld = Trim(x_PLZ_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("PLZ_best") = tmpFld
tmpFld = Trim(x_Ort_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Ort_best") = tmpFld
tmpFld = Trim(x_Telefon_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Telefon_best") = tmpFld
tmpFld = Trim(x_Fax_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Fax_best") = tmpFld
tmpFld = Trim(x_Land_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Land_best") = tmpFld
tmpFld = Trim(x_Email_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Email_best") = tmpFld
tmpFld = Trim(x_Anrede_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Anrede_re") = tmpFld
tmpFld = Trim(x_Firma_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Firma_re") = tmpFld
tmpFld = Trim(x_Nname_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Nname_re") = tmpFld
tmpFld = Trim(x_Vorname_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Vorname_re") = tmpFld
tmpFld = Trim(x_Strasse_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Strasse_re") = tmpFld
tmpFld = Trim(x_Postfach_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Postfach_re") = tmpFld
tmpFld = Trim(x_PLZ_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("PLZ_re") = tmpFld
tmpFld = Trim(x_Ort_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Ort_re") = tmpFld
tmpFld = Trim(x_Telefon_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Telefon_re") = tmpFld
tmpFld = Trim(x_Fax_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Fax_re") = tmpFld
tmpFld = Trim(x_Land_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Land_re") = tmpFld
tmpFld = Trim(x_Email_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Email_re") = tmpFld
tmpFld = Trim(x_Anrede_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Anrede_tec") = tmpFld
tmpFld = Trim(x_Firma_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Firma_tec") = tmpFld
tmpFld = Trim(x_Nname_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Nname_tec") = tmpFld
tmpFld = Trim(x_Vorname_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Vorname_tec") = tmpFld
tmpFld = Trim(x_Strasse_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Strasse_tec") = tmpFld
tmpFld = Trim(x_Postfach_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Postfach_tec") = tmpFld
tmpFld = Trim(x_PLZ_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("PLZ_tec") = tmpFld
tmpFld = Trim(x_Ort_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Ort_tec") = tmpFld
tmpFld = Trim(x_Telefon_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Telefon_tec") = tmpFld
tmpFld = Trim(x_Fax_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Fax_tec") = tmpFld
tmpFld = Trim(x_Land_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Land_tec") = tmpFld
tmpFld = Trim(x_Email_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Email_tec") = tmpFld
tmpFld = x_Kontrolliert
If tmpFld = "1" Then
rs("Kontrolliert") = True
Else
rs("Kontrolliert") = False
End If
tmpFld = Trim(x_erfasst_durch)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("erfasst_durch") = tmpFld
tmpFld = Trim(x_MXrecord)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("MXrecord") = tmpFld
tmpFld = Trim(x_Survey)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Survey") = tmpFld
tmpFld = x_sperrdatum
If IsDate(tmpFld) Then
rs("sperrdatum") = CDate(tmpFld)
Else
rs("sperrdatum") = Null
End If
rs.Update
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
and now i want to do the following:
----------------------------------------------------------------------------------------------------
if the field "Inhaber = Rechnungsadresse" is true, which means
if the "Inhaberadress" is the same as the "Rechnungsadress"
<td bgcolor="#0099CC" class="aspmaker" style="color: #FFFFFF">Inhaber=Rechnungsadresse</td>
<td bgcolor="#F5F5F5"><font class="aspmaker">
<input type="radio" name="x_InhRe">
<%= "Ja" %>
<input type="radio" name="x_InhRe">
<%= "Nein" %></font> </td>
the input be automatically inserted into the DB on both fields, which means, if the Inhaber Entrys are the same as the Rechnungsadresse Entry all Datas shoud be automatically filled in on both --> time saving for typing
how can do this?
best regards
E.Altherr
I use the following code below to insert Datas in a sql Database received from a asp Page
------------------------------------------------------------
' Open Connection to the database
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open xDb_Conn_Str
Select Case a
Case "C": ' Get a record to display
tkey = "" & key & ""
strsql = "SELECT * FROM [Kunden] WHERE [ID]=" & tkey
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql, conn
If rs.Eof Then
Response.Clear
Response.Redirect "Kundenlist.asp"
Else
rs.MoveFirst
' Get the field contents
x_ID = rs("ID")
x_Domain = rs("Domain")
x_TLD = rs("TLD")
x_LoginName = rs("LoginName")
x_Passwort = rs("Passwort")
x_Service = rs("Service")
x_Kundennummer = rs("Kundennummer")
x_FK_ID_Server = rs("FK_ID_Server")
x_Erfasst_am = rs("Erfasst_am")
x_gesperrt = rs("gesperrt")
x_Bemerkungen = rs("Bemerkungen")
x_alte_infos = rs("alte_infos")
x_alg_infos = rs("alg_infos")
x_best_anm = rs("best_anm")
x_Reseller = rs("Reseller")
x_Reseller_nummer = rs("Reseller_nummer")
x_Anrede_best = rs("Anrede_best")
x_Firma_best = rs("Firma_best")
x_Nname_best = rs("Nname_best")
x_Vorname_best = rs("Vorname_best")
x_Strasse_best = rs("Strasse_best")
x_Postfach_best = rs("Postfach_best")
x_PLZ_best = rs("PLZ_best")
x_Ort_best = rs("Ort_best")
x_Telefon_best = rs("Telefon_best")
x_Fax_best = rs("Fax_best")
x_Land_best = rs("Land_best")
x_Email_best = rs("Email_best")
x_Anrede_re = rs("Anrede_re")
x_Firma_re = rs("Firma_re")
x_Nname_re = rs("Nname_re")
x_Vorname_re = rs("Vorname_re")
x_Strasse_re = rs("Strasse_re")
x_Postfach_re = rs("Postfach_re")
x_PLZ_re = rs("PLZ_re")
x_Ort_re = rs("Ort_re")
x_Telefon_re = rs("Telefon_re")
x_Fax_re = rs("Fax_re")
x_Land_re = rs("Land_re")
x_Email_re = rs("Email_re")
x_Anrede_tec = rs("Anrede_tec")
x_Firma_tec = rs("Firma_tec")
x_Nname_tec = rs("Nname_tec")
x_Vorname_tec = rs("Vorname_tec")
x_Strasse_tec = rs("Strasse_tec")
x_Postfach_tec = rs("Postfach_tec")
x_PLZ_tec = rs("PLZ_tec")
x_Ort_tec = rs("Ort_tec")
x_Telefon_tec = rs("Telefon_tec")
x_Fax_tec = rs("Fax_tec")
x_Land_tec = rs("Land_tec")
x_Email_tec = rs("Email_tec")
x_Kontrolliert = rs("Kontrolliert")
x_erfasst_durch = rs("erfasst_durch")
x_MXrecord = rs("MXrecord")
x_Survey = rs("Survey")
x_sperrdatum = rs("sperrdatum")
x_Domainreg = rs("Domainreg")
End If
rs.Close
Set rs = Nothing
Case "A": ' Add
' Get fields from form
x_ID = Request.Form("x_ID")
x_Domain = Request.Form("x_Domain")
x_TLD = Request.Form("x_TLD")
x_LoginName = Request.Form("x_LoginName")
x_Passwort = Request.Form("x_Passwort")
x_Service = Request.Form("x_Service")
x_Kundennummer = Request.Form("x_Kundennummer")
x_FK_ID_Server = Request.Form("x_FK_ID_Server")
x_Erfasst_am = Request.Form("x_Erfasst_am")
x_gesperrt = Request.Form("x_gesperrt")
x_Bemerkungen = Request.Form("x_Bemerkungen")
x_alte_infos = Request.Form("x_alte_infos")
x_alg_infos = Request.Form("x_alg_infos")
x_best_anm = Request.Form("x_best_anm")
x_Reseller = Request.Form("x_Reseller")
x_Reseller_nummer = Request.Form("x_Reseller_nummer")
x_Anrede_best = Request.Form("x_Anrede_best")
x_Firma_best = Request.Form("x_Firma_best")
x_Nname_best = Request.Form("x_Nname_best")
x_Vorname_best = Request.Form("x_Vorname_best")
x_Strasse_best = Request.Form("x_Strasse_best")
x_Postfach_best = Request.Form("x_Postfach_best")
x_PLZ_best = Request.Form("x_PLZ_best")
x_Ort_best = Request.Form("x_Ort_best")
x_Telefon_best = Request.Form("x_Telefon_best")
x_Fax_best = Request.Form("x_Fax_best")
x_Land_best = Request.Form("x_Land_best")
x_Email_best = Request.Form("x_Email_best")
x_Anrede_re = Request.Form("x_Anrede_re")
x_Firma_re = Request.Form("x_Firma_re")
x_Nname_re = Request.Form("x_Nname_re")
x_Vorname_re = Request.Form("x_Vorname_re")
x_Strasse_re = Request.Form("x_Strasse_re")
x_Postfach_re = Request.Form("x_Postfach_re")
x_PLZ_re = Request.Form("x_PLZ_re")
x_Ort_re = Request.Form("x_Ort_re")
x_Telefon_re = Request.Form("x_Telefon_re")
x_Fax_re = Request.Form("x_Fax_re")
x_Land_re = Request.Form("x_Land_re")
x_Email_re = Request.Form("x_Email_re")
x_Anrede_tec = Request.Form("x_Anrede_tec")
x_Firma_tec = Request.Form("x_Firma_tec")
x_Nname_tec = Request.Form("x_Nname_tec")
x_Vorname_tec = Request.Form("x_Vorname_tec")
x_Strasse_tec = Request.Form("x_Strasse_tec")
x_Postfach_tec = Request.Form("x_Postfach_tec")
x_PLZ_tec = Request.Form("x_PLZ_tec")
x_Ort_tec = Request.Form("x_Ort_tec")
x_Telefon_tec = Request.Form("x_Telefon_tec")
x_Fax_tec = Request.Form("x_Fax_tec")
x_Land_tec = Request.Form("x_Land_tec")
x_Email_tec = Request.Form("x_Email_tec")
x_Kontrolliert = Request.Form("x_Kontrolliert")
x_erfasst_durch = Request.Form("x_erfasst_durch")
x_MXrecord = Request.Form("x_MXrecord")
x_Survey = Request.Form("x_Survey")
x_sperrdatum = Request.Form("x_sperrdatum")
x_Domainreg = Request.Form("x_Domainreg")
x_InhRe = Request.Form("x_InhRe")
' Open record
strsql = "SELECT * FROM [Kunden] WHERE 0 = 1"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql, conn, 1, 2
rs.AddNew
tmpFld = x_ID
If Not IsNumeric(tmpFld) Then tmpFld = 0
srchFld = tmpFld
strsql = "SELECT * FROM [Kunden] WHERE [ID] = " & srchFld
Set rschk = conn.Execute(strsql)
If Not rschk.Eof Then
Response.Write "Achtung doppelte Laufnummer -- ID, value = " & tmpFld & "<br>"
Response.Write "Im Browser auf zurückklicken und nochmals versuchen!"
Response.End
End If
rschk.Close
Set rschk = Nothing
rs("ID") = CLng(tmpFld)
tmpFld = Trim(x_Domain)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Domain") = tmpFld
tmpFld = Trim(x_TLD)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("TLD") = tmpFld
tmpFld = Trim(x_LoginName)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("LoginName") = tmpFld
tmpFld = Trim(x_Passwort)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Passwort") = tmpFld
tmpFld = Trim(x_Service)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Service") = tmpFld
tmpFld = Trim(x_Kundennummer)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Kundennummer") = tmpFld
tmpFld = Trim(x_FK_ID_Server)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("FK_ID_Server") = tmpFld
tmpFld = x_Erfasst_am
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Erfasst_am") = CLng(tmpFld)
tmpFld = x_gesperrt
If tmpFld = "1" Then
rs("gesperrt") = True
Else
rs("gesperrt") = False
End If
tmpFld = Trim(x_Bemerkungen)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Bemerkungen") = tmpFld
tmpFld = Trim(x_alte_infos)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("alte_infos") = tmpFld
tmpFld = Trim(x_alg_infos)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("alg_infos") = tmpFld
tmpFld = Trim(x_best_anm)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("best_anm") = tmpFld
tmpFld = x_Reseller
If tmpFld = "1" Then
rs("Reseller") = True
Else
rs("Reseller") = False
End If
tmpFld = Trim(x_Reseller_nummer)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Reseller_nummer") = tmpFld
tmpFld = Trim(x_Anrede_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Anrede_best") = tmpFld
tmpFld = Trim(x_Firma_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Firma_best") = tmpFld
tmpFld = Trim(x_Nname_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Nname_best") = tmpFld
tmpFld = Trim(x_Vorname_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Vorname_best") = tmpFld
tmpFld = Trim(x_Strasse_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Strasse_best") = tmpFld
tmpFld = Trim(x_Postfach_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Postfach_best") = tmpFld
tmpFld = Trim(x_PLZ_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("PLZ_best") = tmpFld
tmpFld = Trim(x_Ort_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Ort_best") = tmpFld
tmpFld = Trim(x_Telefon_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Telefon_best") = tmpFld
tmpFld = Trim(x_Fax_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Fax_best") = tmpFld
tmpFld = Trim(x_Land_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Land_best") = tmpFld
tmpFld = Trim(x_Email_best)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Email_best") = tmpFld
tmpFld = Trim(x_Anrede_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Anrede_re") = tmpFld
tmpFld = Trim(x_Firma_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Firma_re") = tmpFld
tmpFld = Trim(x_Nname_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Nname_re") = tmpFld
tmpFld = Trim(x_Vorname_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Vorname_re") = tmpFld
tmpFld = Trim(x_Strasse_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Strasse_re") = tmpFld
tmpFld = Trim(x_Postfach_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Postfach_re") = tmpFld
tmpFld = Trim(x_PLZ_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("PLZ_re") = tmpFld
tmpFld = Trim(x_Ort_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Ort_re") = tmpFld
tmpFld = Trim(x_Telefon_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Telefon_re") = tmpFld
tmpFld = Trim(x_Fax_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Fax_re") = tmpFld
tmpFld = Trim(x_Land_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Land_re") = tmpFld
tmpFld = Trim(x_Email_re)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Email_re") = tmpFld
tmpFld = Trim(x_Anrede_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Anrede_tec") = tmpFld
tmpFld = Trim(x_Firma_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Firma_tec") = tmpFld
tmpFld = Trim(x_Nname_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Nname_tec") = tmpFld
tmpFld = Trim(x_Vorname_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Vorname_tec") = tmpFld
tmpFld = Trim(x_Strasse_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Strasse_tec") = tmpFld
tmpFld = Trim(x_Postfach_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Postfach_tec") = tmpFld
tmpFld = Trim(x_PLZ_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("PLZ_tec") = tmpFld
tmpFld = Trim(x_Ort_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Ort_tec") = tmpFld
tmpFld = Trim(x_Telefon_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Telefon_tec") = tmpFld
tmpFld = Trim(x_Fax_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Fax_tec") = tmpFld
tmpFld = Trim(x_Land_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Land_tec") = tmpFld
tmpFld = Trim(x_Email_tec)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Email_tec") = tmpFld
tmpFld = x_Kontrolliert
If tmpFld = "1" Then
rs("Kontrolliert") = True
Else
rs("Kontrolliert") = False
End If
tmpFld = Trim(x_erfasst_durch)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("erfasst_durch") = tmpFld
tmpFld = Trim(x_MXrecord)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("MXrecord") = tmpFld
tmpFld = Trim(x_Survey)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Survey") = tmpFld
tmpFld = x_sperrdatum
If IsDate(tmpFld) Then
rs("sperrdatum") = CDate(tmpFld)
Else
rs("sperrdatum") = Null
End If
rs.Update
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
and now i want to do the following:
----------------------------------------------------------------------------------------------------
if the field "Inhaber = Rechnungsadresse" is true, which means
if the "Inhaberadress" is the same as the "Rechnungsadress"
<td bgcolor="#0099CC" class="aspmaker" style="color: #FFFFFF">Inhaber=Rechnungsadresse</td>
<td bgcolor="#F5F5F5"><font class="aspmaker">
<input type="radio" name="x_InhRe">
<%= "Ja" %>
<input type="radio" name="x_InhRe">
<%= "Nein" %></font> </td>
the input be automatically inserted into the DB on both fields, which means, if the Inhaber Entrys are the same as the Rechnungsadresse Entry all Datas shoud be automatically filled in on both --> time saving for typing
how can do this?
best regards
E.Altherr