hello..
this is the part i want to turn into strings:
ADR;WORK;PREF:;;Sjoerd Veltmanstraat 15;Drachten;;9203 NJ
ENCODING=QUOTED-PRINTABLE:Sjoerd Veltmanstraat 15
Sjoerd Veltmanstraat 15 must be strAdres
Drachten must be strPlaats
and 9203 NJ must be strPostcode.
This is what I have to input into the database..:
strInsert = "INSERT INTO Relaties (B22_relnr, B22_rel_soort, B22_naam, B22_voornaam_etc, " _
& "B22_adres, B22_postcode, B22_plaats, B22_telefoon1, B22_telefoon2, " _
& "B22_mobielnr, B22_faxnummer, B22_email, B22_www_adres, B22_zoeknaam) " _
& " VALUES (" & intNummer & ", '" & strSoort & "', '" & strNaam _
& "', '" & strVoornaam & "', '" & strAdres _
& "', '" & strPostcode & "', '" & strPlaats & "', '" & strTelWerk _
& "', '" & strTelThuis & "', '" & strMobiel & "', '" & strFaxWerk _
& "', '" & strMail & "', '" & strUrlWerk & "', '" & strZoek & "' )"
This code is ok and it's been working Except for the adres, plaats, postcode.
After I have solved this I can display the website and email adres.
For strings I have this:
Dim strBestand As String = " "
Dim strRegel As String = String.Empty
Dim strWaarde() As String = Nothing
Dim objReader As System.IO.StreamReader = Nothing, _
sbBuilder As System.Text.StringBuilder = Nothing
Dim intNummer As Integer = "20102012"
Dim strSoort As String = "D"
Dim strNaam As String = " "
Dim strVoornaam As String = " "
Dim strTelWerk As String = " "
Dim strTelThuis As String = " "
Dim strMobiel As String = " "
Dim strOverig As String = " "
Dim strFaxWerk As String = " "
Dim strFaxThuis As String = " "
Dim strPostcode As String = " "
Dim strPlaats As String = " "
Dim strAdres As String = " "
Dim strUrlThuis As String = " "
Dim strUrlWerk As String = " "
Dim strMail As String = " "
Dim strZoek As String = "testtest"
I use Cases to Insert the strings:
Select Case UCase(strWaarde(0)) '(0) = het gedeelte voor ":" en (1) komt daarna:
Case "BEGIN", "VERSION", "END"
', "ENCODING=QUOTED-PRINTABLE"
Case "N"
strNaam = strWaarde(1)
sbBuilder.Append(strWaarde(1) & vbTab)
Case "FN" 'Voornaam:
strVoornaam = strWaarde(1)
sbBuilder.Append(strWaarde(1) & vbCrLf)
Case "TEL;WORK;VOICE" 'Telefoon op het werk:
If blnDubbel = False Then
strTelWerk = strWaarde(1)
sbBuilder.Append(strWaarde(1) & vbTab)
blnDubbel = True
End If
Case "TEL;HOME;VOICE" 'Telefoon thuis:
strTelThuis = strWaarde(1)
sbBuilder.Append(strWaarde(1) & vbCrLf)
Case "TEL;CELL;VOICE" 'Mobiele telefoon:
strMobiel = strWaarde(1)
sbBuilder.Append(strWaarde(1) & vbTab)
Case "TEL;VOICE" 'Overige nummers:
strOverig = strWaarde(1)
sbBuilder.Append(strWaarde(1) & vbCrLf)
Case "TEL;WORK;FAX" 'Fax op het werk:
strFaxWerk = strWaarde(1)
sbBuilder.Append(strWaarde(1) & vbTab)
Case "TEL;FAX" 'Fax thuis:
strFaxThuis = strWaarde(1)
sbBuilder.Append(strWaarde(1) & vbCrLf)
Case "ADR;WORK;PREF:;;" 'Adresgegevens:
strAdres = strWaarde(1)
sbBuilder.Append(strWaarde(1) & vbCrLf)
Case "ENCODING=QUOTED-PRINTABLE:"
strAdres = strWaarde(1)
sbBuilder.Append(strWaarde(1) & vbCrLf)
Case "URL;HOME:" 'Website Thuis:
strUrlThuis = strWaarde(1)
sbBuilder.Append(strWaarde(1) & vbTab)
Case "URL;WORK:" 'Website Werk:
strUrlWerk = strWaarde(1)
sbBuilder.Append(strWaarde(1) & vbCrLf)
Case "EMAIL;PREF;INTERNET:" 'Email adres:
strMail = strWaarde(1)
sbBuilder.Append(strWaarde(1))
Case Else
sbBuilder.Append(strWaarde(1) & vbCrLf)
End Select
can someone help me out?
Thanks