/ Forside / Teknologi / Udvikling / ASP / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
ASP
#NavnPoint
smorch 9259
Harlekin 1866
molokyle 1040
Steffanst.. 758
gandalf 657
smilly 564
gibson 560
cumano 530
MouseKeep.. 480
10  Random 410
Min ASP sender intet til Access databasen
Fra : Mads Nielsen


Dato : 01-08-01 10:51

Hej Hej

Jeg har et problem med min ASP !!
ASP'en melder ikke om nogen fejl og Access modtager ingen data !!

jeg kan maile databasen hvis det er nødvendigt !!

Her er ASP koden:

<%@ Language=VBScript %>
<% Option Explicit %>
<!--#include virtual="/adovbs.inc"-->

<html>
<head>
<title>5b.asp</title>                                    
</head>

<body style="font-family: Arial; font-size: 10 pt; font-weight:
bold" bgcolor="#C0C0C0">   

<table border="0" width="40%">
<tr>
<td width="19%"><font size="2">Navn</font></td>
<td width="41%"><%=request.form("KundeNavn")%></td>
<td width="10%">&nbsp;</td>
</tr>
<tr>
<td width="19%"><font size="2">Tlf</font></td>
<td width="41%"><%=request.form("KundeTlf")%></td>
<td width="10%">&nbsp;</td>
</tr>
<tr>
<td width="19%"><font size="2">evt. Fax</font></td>
<td width="41%"><%=request.form("KundeFax")%></td>
<td width="10%">&nbsp;</td>
</tr>
<tr>
<td width="19%"><font size="2">e-mail</font></td>
<td width="41%"><%=request.form("KundeEmail")%></td>
<td width="10%">&nbsp;</td>
</tr>
<tr>
<td width="19%"><font size="2">Mærke</font></td>
<td width="41%"><%=request.form("Make")%></td>
<td width="10%">&nbsp;</td>
</tr>
<tr>
<td width="19%"><font size="2">Model</font></td>
<td width="41%"><%=request.form("Model")%></td>
<td width="10%">&nbsp;</td>
</tr>
<tr>
<td width="19%"><font size="2">Version</font></td>
<td width="41%"><%=request.form("Version")%></td>
<td width="10%">&nbsp;</td>
</tr>
<tr>
<td width="19%"><font size="2">Farve</font></td>
<td width="41%"><%=request.form("color")%></td>
<td width="10%">&nbsp;</td>
</tr>
<tr>
<td width="19%"><font size="2">Trim</font></td>
<td width="41%"><%=request.form("trim")%></td>
<td width="10%">&nbsp;</td>
</tr>
<tr>
<td width="19%"><font size="2">Total Pris</font></td>
<td width="41%" align="Right"><%=request.form("Total")%></td>
<td width="10%"><font size="2">DKr</font></td>
</tr>
</table>
               
<font size="2">Ekstraudstyr: </font><br>
<%

dim myArrEkstra, i, ekstraUdstyr

for i = 1 to Request.form("Ekstra").count   

   myArrEkstra = split(Request.form("Ekstra")(i),"¤")

   ekstraUdstyr = ekstraUdstyr & myArrEkstra(1) & vbcrlf

   response.write "<font size=1><input type='hidden' name='Ekstra'
value='" & Request.form("Ekstra")(i) & "'>"

   response.write myArrEkstra(1) & "</font><br>"
next

   dim sql, objConn, dbCon

   'Set objConn = Server.CreateObject("ADODB.Connection")
   'objConn.ConnectionString =
"provider=Microsoft.Jet.OLEDB.4.0;data source=" &
server.mappath("db/testdb1.mdb")
   set dbCon = Server.CreateObject("ADODB.Connection")
   dbCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
server.MapPath("db/testdb1.mdb")



   'objConn.open

   sql = "INSERT INTO 'T_Ordre_Fra_Web' (Navn, Tlf, Fax, Email,
Make, Model, Version, Ekstra, Color, Trim, Total) VALUES('" &
request.form("KundeNavn") & "','" & request.form("KundeTlf") &
"', '" & request.form("KundeFax") & "','" &
request.form("KundeEmail") & "','" & request.form("Make") & "','"
& request.form("Model") & "','" & request.form("Version") & "','"
& request.form("Ekstra") & "','" & request.form("color") & "','"
& request.form("trim") & "'," & request.form("Total")& ")"

   'sql = "INSERT INTO T_Ordre_Fra_Web (Navn, Tlf, Fax, Email,
Make, Model, Version) VALUES('" & request.form("KundeNavn") & "',
'" & request.form("KundeTlf") & "', '" & request.form("KundeFax")
& "', '" & request.form("KundeEmail") & "', '" &
request.form("Make") & "', '" & request.form("Model") & "', '" &
request.form("Version") & "')"

   'sql = "INSERT INTO T_Ordre_Fra_Web (Navn, Tlf, Fax, Email,
Make, Model, Version, Trim, Color, Total) VALUES('" &
request.form("KundeNavn") & "','" & request.form("KundeTlf") &
"', '" & request.form("KundeFax") & "','" &
request.form("KundeEmail") & "','" & request.form("Make") & "','"
& request.form("Model") & "','" & request.form("Version") & "','"
& request.form("color") & "','" & request.form("trim") & "'," &
request.form("Total") & ")"

   'sql = "INSERT INTO T_Ordre_Fra_Web (Navn) VALUES('" &
request.form("KundeNavn") & "')"

   'sql = "INSERT INTO T_Ordre_Fra_Web (Navn) VALUES('KundeNavn')"
   
   
   response.write sql
   
   response.end
   
   'dbCon.execute(sql)

%>

</body>




Hvad er der da galt ???

--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP ???
- Pædagoiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! => http://www.html.dk/tutorials

 
 
QuizLand.dk (01-08-2001)
Kommentar
Fra : QuizLand.dk


Dato : 01-08-01 17:14

Jeg synes ikke at jeg kan se

<Form action ="script.asp" method="post">

</form>

rundt om dine formfelter

Steen, udvikler
***************
Quiz og Vind:
www.QuizLand.dk
***************


"Mads Nielsen" <Madsnn74@hotmail.com> wrote in message
news:9k8je8$dq9$1@sunsite.dk...
> Hej Hej
>
> Jeg har et problem med min ASP !!
> ASP'en melder ikke om nogjen fejl og Access modtager ingen data !!
>
> jeg kan maile databasen hvis det er nødvendigt !!
>
> Her er ASP koden:
>
> <%@ Language=VBScript %>
> <% Option Explicit %>
> <!--#include virtual="/adovbs.inc"-->
>
> <html>
> <head>
> <title>5b.asp</title>
> </head>
>
> <body style="font-family: Arial; font-size: 10 pt; font-weight:
> bold" bgcolor="#C0C0C0">
>
> <table border="0" width="40%">
> <tr>
> <td width="19%"><font size="2">Navn</font></td>
> <td width="41%"><%=request.form("KundeNavn")%></td>
> <td width="10%">&nbsp;</td>
> </tr>
> <tr>
> <td width="19%"><font size="2">Tlf</font></td>
> <td width="41%"><%=request.form("KundeTlf")%></td>
> <td width="10%">&nbsp;</td>
> </tr>
> <tr>
> <td width="19%"><font size="2">evt. Fax</font></td>
> <td width="41%"><%=request.form("KundeFax")%></td>
> <td width="10%">&nbsp;</td>
> </tr>
> <tr>
> <td width="19%"><font size="2">e-mail</font></td>
> <td width="41%"><%=request.form("KundeEmail")%></td>
> <td width="10%">&nbsp;</td>
> </tr>
> <tr>
> <td width="19%"><font size="2">Mærke</font></td>
> <td width="41%"><%=request.form("Make")%></td>
> <td width="10%">&nbsp;</td>
> </tr>
> <tr>
> <td width="19%"><font size="2">Model</font></td>
> <td width="41%"><%=request.form("Model")%></td>
> <td width="10%">&nbsp;</td>
> </tr>
> <tr>
> <td width="19%"><font size="2">Version</font></td>
> <td width="41%"><%=request.form("Version")%></td>
> <td width="10%">&nbsp;</td>
> </tr>
> <tr>
> <td width="19%"><font size="2">Farve</font></td>
> <td width="41%"><%=request.form("color")%></td>
> <td width="10%">&nbsp;</td>
> </tr>
> <tr>
> <td width="19%"><font size="2">Trim</font></td>
> <td width="41%"><%=request.form("trim")%></td>
> <td width="10%">&nbsp;</td>
> </tr>
> <tr>
> <td width="19%"><font size="2">Total Pris</font></td>
> <td width="41%" align="Right"><%=request.form("Total")%></td>
> <td width="10%"><font size="2">DKr</font></td>
> </tr>
> </table>
>
> <font size="2">Ekstraudstyr: </font><br>
> <%
>
> dim myArrEkstra, i, ekstraUdstyr
>
> for i = 1 to Request.form("Ekstra").count
>
> myArrEkstra = split(Request.form("Ekstra")(i),"¤")
>
> ekstraUdstyr = ekstraUdstyr & myArrEkstra(1) & vbcrlf
>
> response.write "<font size=1><input type='hidden' name='Ekstra'
> value='" & Request.form("Ekstra")(i) & "'>"
>
> response.write myArrEkstra(1) & "</font><br>"
> next
>
> dim sql, objConn, dbCon
>
> 'Set objConn = Server.CreateObject("ADODB.Connection")
> 'objConn.ConnectionString =
> "provider=Microsoft.Jet.OLEDB.4.0;data source=" &
> server.mappath("db/testdb1.mdb")
> set dbCon = Server.CreateObject("ADODB.Connection")
> dbCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
> server.MapPath("db/testdb1.mdb")
>
>
>
> 'objConn.open
>
> sql = "INSERT INTO 'T_Ordre_Fra_Web' (Navn, Tlf, Fax, Email,
> Make, Model, Version, Ekstra, Color, Trim, Total) VALUES('" &
> request.form("KundeNavn") & "','" & request.form("KundeTlf") &
> "', '" & request.form("KundeFax") & "','" &
> request.form("KundeEmail") & "','" & request.form("Make") & "','"
> & request.form("Model") & "','" & request.form("Version") & "','"
> & request.form("Ekstra") & "','" & request.form("color") & "','"
> & request.form("trim") & "'," & request.form("Total")& ")"
>
> 'sql = "INSERT INTO T_Ordre_Fra_Web (Navn, Tlf, Fax, Email,
> Make, Model, Version) VALUES('" & request.form("KundeNavn") & "',
> '" & request.form("KundeTlf") & "', '" & request.form("KundeFax")
> & "', '" & request.form("KundeEmail") & "', '" &
> request.form("Make") & "', '" & request.form("Model") & "', '" &
> request.form("Version") & "')"
>
> 'sql = "INSERT INTO T_Ordre_Fra_Web (Navn, Tlf, Fax, Email,
> Make, Model, Version, Trim, Color, Total) VALUES('" &
> request.form("KundeNavn") & "','" & request.form("KundeTlf") &
> "', '" & request.form("KundeFax") & "','" &
> request.form("KundeEmail") & "','" & request.form("Make") & "','"
> & request.form("Model") & "','" & request.form("Version") & "','"
> & request.form("color") & "','" & request.form("trim") & "'," &
> request.form("Total") & ")"
>
> 'sql = "INSERT INTO T_Ordre_Fra_Web (Navn) VALUES('" &
> request.form("KundeNavn") & "')"
>
> 'sql = "INSERT INTO T_Ordre_Fra_Web (Navn) VALUES('KundeNavn')"
>
>
> response.write sql
>
> response.end
>
> 'dbCon.execute(sql)
>
> %>
>
> </body>
>
>
>
>
> Hvad er der da galt ???
>
> --
> Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP ???
> - Pædagoiske tutorials på dansk
> - Kom godt i gang med koderne
> KLIK HER! => http://www.html.dk/tutorials



Mads Nielsen (02-08-2001)
Kommentar
Fra : Mads Nielsen


Dato : 02-08-01 09:18

Hej Steen

Jeg mener ikke at det er nødvendigt, jeg skulle kunne bruge sql'koden
INSERT INTO og ASP'koden objConn.execute(sql).
Er det ikke rigtigt ??

Mvh. Mads


QuizLand.dk wrote in dk.edb.internet.webdesign.serverside.asp:
> Jeg synes ikke at jeg kan se
>
> <Form action ="script.asp" method="post">
>
> </form>
>
> rundt om dine formfelter
>
> Steen, udvikler
> ***************
> Quiz og Vind:
> www.QuizLand.dk
> ***************
>
>
> "Mads Nielsen" <Madsnn74@hotmail.com> wrote in message
> news:9k8je8$dq9$1@sunsite.dk...
> > Hej Hej
> >
> > Jeg har et problem med min ASP !!
> > ASP'en melder ikke om nogjen fejl og Access modtager ingen data !!
> >
> > jeg kan maile databasen hvis det er nødvendigt !!
> >
> > Her er ASP koden:
> >
> > <%@ Language=VBScript %>
> > <% Option Explicit %>
> > <!--#include virtual="/adovbs.inc"-->
> >
> > <html>
> > <head>
> > <title>5b.asp</title>
> > </head>
> >
> > <body style="font-family: Arial; font-size: 10 pt; font-weight:
> > bold" bgcolor="#C0C0C0">
> >
> > <table border="0" width="40%">
> > <tr>
> > <td width="19%"><font size="2">Navn</font></td>
> > <td width="41%"><%=request.form("KundeNavn")%></td>
> > <td width="10%"> </td>
> > </tr>
> > <tr>
> > <td width="19%"><font size="2">Tlf</font></td>
> > <td width="41%"><%=request.form("KundeTlf")%></td>
> > <td width="10%"> </td>
> > </tr>
> > <tr>
> > <td width="19%"><font size="2">evt. Fax</font></td>
> > <td width="41%"><%=request.form("KundeFax")%></td>
> > <td width="10%"> </td>
> > </tr>
> > <tr>
> > <td width="19%"><font size="2">e-mail</font></td>
> > <td width="41%"><%=request.form("KundeEmail")%></td>
> > <td width="10%"> </td>
> > </tr>
> > <tr>
> > <td width="19%"><font size="2">Mærke</font></td>
> > <td width="41%"><%=request.form("Make")%></td>
> > <td width="10%"> </td>
> > </tr>
> > <tr>
> > <td width="19%"><font size="2">Model</font></td>
> > <td width="41%"><%=request.form("Model")%></td>
> > <td width="10%"> </td>
> > </tr>
> > <tr>
> > <td width="19%"><font size="2">Version</font></td>
> > <td width="41%"><%=request.form("Version")%></td>
> > <td width="10%"> </td>
> > </tr>
> > <tr>
> > <td width="19%"><font size="2">Farve</font></td>
> > <td width="41%"><%=request.form("color")%></td>
> > <td width="10%"> </td>
> > </tr>
> > <tr>
> > <td width="19%"><font size="2">Trim</font></td>
> > <td width="41%"><%=request.form("trim")%></td>
> > <td width="10%"> </td>
> > </tr>
> > <tr>
> > <td width="19%"><font size="2">Total Pris</font></td>
> > <td width="41%" align="Right"><%=request.form("Total")%></td>
> > <td width="10%"><font size="2">DKr</font></td>
> > </tr>
> > </table>
> >
> > <font size="2">Ekstraudstyr: </font><br>
> > <%
&gt; >
&gt; > dim myArrEkstra, i, ekstraUdstyr
&gt; >
&gt; > for i = 1 to Request.form("Ekstra").count
&gt; >
&gt; > myArrEkstra = split(Request.form("Ekstra")(i),"¤")
&gt; >
&gt; > ekstraUdstyr = ekstraUdstyr & myArrEkstra(1) & vbcrlf
&gt; >
&gt; > response.write "<font size=1><input type='hidden' name='Ekstra'
&gt; > value='" & Request.form("Ekstra")(i) & "'>"
&gt; >
&gt; > response.write myArrEkstra(1) & "</font><br>"
&gt; > next
&gt; >
&gt; > dim sql, objConn, dbCon
&gt; >
&gt; > 'Set objConn = Server.CreateObject("ADODB.Connection")
&gt; > 'objConn.ConnectionString =
&gt; > "provider=Microsoft.Jet.OLEDB.4.0;data source=" &
&gt; > server.mappath("db/testdb1.mdb")
&gt; > set dbCon = Server.CreateObject("ADODB.Connection")
&gt; > dbCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
&gt; > server.MapPath("db/testdb1.mdb")
&gt; >
&gt; >
&gt; >
&gt; > 'objConn.open
&gt; >
&gt; > sql = "INSERT INTO 'T_Ordre_Fra_Web' (Navn, Tlf, Fax, Email,
&gt; > Make, Model, Version, Ekstra, Color, Trim, Total) VALUES('" &
&gt; > request.form("KundeNavn") & "','" & request.form("KundeTlf") &
&gt; > "', '" & request.form("KundeFax") & "','" &
&gt; > request.form("KundeEmail") & "','" & request.form("Make") &
"','"
&gt; > & request.form("Model") & "','" & request.form("Version") &
"','"
&gt; > & request.form("Ekstra") & "','" & request.form("color") & "','"
&gt; > & request.form("trim") & "'," & request.form("Total")& ")"
&gt; >
&gt; > 'sql = "INSERT INTO T_Ordre_Fra_Web (Navn, Tlf, Fax, Email,
&gt; > Make, Model, Version) VALUES('" & request.form("KundeNavn") &
"',
&gt; > '" & request.form("KundeTlf") & "', '" &
request.form("KundeFax")
&gt; > & "', '" & request.form("KundeEmail") & "', '" &
&gt; > request.form("Make") & "', '" & request.form("Model") & "', '" &
&gt; > request.form("Version") & "')"
&gt; >
&gt; > 'sql = "INSERT INTO T_Ordre_Fra_Web (Navn, Tlf, Fax, Email,
&gt; > Make, Model, Version, Trim, Color, Total) VALUES('" &
&gt; > request.form("KundeNavn") & "','" & request.form("KundeTlf") &
&gt; > "', '" & request.form("KundeFax") & "','" &
&gt; > request.form("KundeEmail") & "','" & request.form("Make") &
"','"
&gt; > & request.form("Model") & "','" & request.form("Version") &
"','"
&gt; > & request.form("color") & "','" & request.form("trim") & "'," &
&gt; > request.form("Total") & ")"
&gt; >
&gt; > 'sql = "INSERT INTO T_Ordre_Fra_Web (Navn) VALUES('" &
&gt; > request.form("KundeNavn") & "')"
&gt; >
&gt; > 'sql = "INSERT INTO T_Ordre_Fra_Web (Navn) VALUES('KundeNavn')"
&gt; >
&gt; >
&gt; > response.write sql
&gt; >
&gt; > response.end
&gt; >
&gt; > 'dbCon.execute(sql)
&gt; >
&gt; > %>
> >
> > </body>
> >
> >
> >
> >
> > Hvad er der da galt ???
> >
> > --
> > Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP ???
> > - Pædagoiske tutorials på dansk
> > - Kom godt i gang med koderne
> > KLIK HER! => http://www.html.dk/tutorials
>
>


--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP ???
- Pædagoiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! => http://www.html.dk/tutorials

Mads Nielsen (03-08-2001)
Kommentar
Fra : Mads Nielsen


Dato : 03-08-01 10:29

Hej igen

Jeg har løst mit problem, med hjælp fra ASP101 (.com)

PS: jeg skulle ikke bruge form og /form.

Mvh. Mads.


Mads Nielsen wrote in dk.edb.internet.webdesign.serverside.asp:
> Hej Steen
>
> Jeg mener ikke at det er nødvendigt, jeg skulle kunne bruge sql'koden
> INSERT INTO og ASP'koden objConn.execute(sql).
> Er det ikke rigtigt ??
>
> Mvh. Mads
>
>
> QuizLand.dk wrote in dk.edb.internet.webdesign.serverside.asp:
> > Jeg synes ikke at jeg kan se
> >
> > <Form action ="script.asp" method="post">
> >
> > </form>
> >
> > rundt om dine formfelter
> >
> > Steen, udvikler
> > ***************
> > Quiz og Vind:
> > www.QuizLand.dk
> > ***************
> >
> >
> > "Mads Nielsen" <Madsnn74@hotmail.com> wrote in message
> > news:9k8je8$dq9$1@sunsite.dk...
> > > Hej Hej
> > >
> > > Jeg har et problem med min ASP !!
> > > ASP'en melder ikke om nogjen fejl og Access modtager ingen data !!
> > >
> > > jeg kan maile databasen hvis det er nødvendigt !!
> > >
> > > Her er ASP koden:
> > >
> > > <%@ Language=VBScript %>
> > > <% Option Explicit %>
> > > <!--#include virtual="/adovbs.inc"-->
> > >
> > > <html>
> > > <head>
> > > <title>5b.asp</title>
> > > </head>
> > >
> > > <body style="font-family: Arial; font-size: 10 pt; font-weight:
> > > bold" bgcolor="#C0C0C0">
> > >
> > > <table border="0" width="40%">
> > > <tr>
> > > <td width="19%"><font size="2">Navn</font></td>
> > > <td width="41%"><%=request.form("KundeNavn")%></td>
> > > <td width="10%"> </td>
> > > </tr>
> > > <tr>
> > > <td width="19%"><font size="2">Tlf</font></td>
> > > <td width="41%"><%=request.form("KundeTlf")%></td>
> > > <td width="10%"> </td>
> > > </tr>
> > > <tr>
> > > <td width="19%"><font size="2">evt. Fax</font></td>
> > > <td width="41%"><%=request.form("KundeFax")%></td>
> > > <td width="10%"> </td>
> > > </tr>
> > > <tr>
> > > <td width="19%"><font size="2">e-mail</font></td>
> > > <td width="41%"><%=request.form("KundeEmail")%></td>
> > > <td width="10%"> </td>
> > > </tr>
> > > <tr>
> > > <td width="19%"><font size="2">Mærke</font></td>
> > > <td width="41%"><%=request.form("Make")%></td>
> > > <td width="10%"> </td>
> > > </tr>
> > > <tr>
> > > <td width="19%"><font size="2">Model</font></td>
> > > <td width="41%"><%=request.form("Model")%></td>
> > > <td width="10%"> </td>
> > > </tr>
> > > <tr>
> > > <td width="19%"><font size="2">Version</font></td>
> > > <td width="41%"><%=request.form("Version")%></td>
> > > <td width="10%"> </td>
> > > </tr>
> > > <tr>
> > > <td width="19%"><font size="2">Farve</font></td>
> > > <td width="41%"><%=request.form("color")%></td>
> > > <td width="10%"> </td>
> > > </tr>
> > > <tr>
> > > <td width="19%"><font size="2">Trim</font></td>
> > > <td width="41%"><%=request.form("trim")%></td>
> > > <td width="10%"> </td>
> > > </tr>
> > > <tr>
> > > <td width="19%"><font size="2">Total Pris</font></td>
> > > <td width="41%" align="Right"><%=request.form("Total")%></td>
> > > <td width="10%"><font size="2">DKr</font></td>
> > > </tr>
> > > </table>
> > >
> > > <font size="2">Ekstraudstyr: </font><br>
> > > <%
&gt; &gt; >
&gt; &gt; > dim myArrEkstra, i, ekstraUdstyr
&gt; &gt; >
&gt; &gt; > for i = 1 to Request.form("Ekstra").count
&gt; &gt; >
&gt; &gt; > myArrEkstra = split(Request.form("Ekstra")(i),"¤")
&gt; &gt; >
&gt; &gt; > ekstraUdstyr = ekstraUdstyr & myArrEkstra(1) & vbcrlf
&gt; &gt; >
&gt; &gt; > response.write "<font size=1><input type='hidden'
name='Ekstra'
&gt; &gt; > value='" & Request.form("Ekstra")(i) & "'>"
&gt; &gt; >
&gt; &gt; > response.write myArrEkstra(1) & "</font><br>"
&gt; &gt; > next
&gt; &gt; >
&gt; &gt; > dim sql, objConn, dbCon
&gt; &gt; >
&gt; &gt; > 'Set objConn = Server.CreateObject("ADODB.Connection")
&gt; &gt; > 'objConn.ConnectionString =
&gt; &gt; > "provider=Microsoft.Jet.OLEDB.4.0;data source=" &
&gt; &gt; > server.mappath("db/testdb1.mdb")
&gt; &gt; > set dbCon = Server.CreateObject("ADODB.Connection")
&gt; &gt; > dbCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="
&
&gt; &gt; > server.MapPath("db/testdb1.mdb")
&gt; &gt; >
&gt; &gt; >
&gt; &gt; >
&gt; &gt; > 'objConn.open
&gt; &gt; >
&gt; &gt; > sql = "INSERT INTO 'T_Ordre_Fra_Web' (Navn, Tlf, Fax, Email,
&gt; &gt; > Make, Model, Version, Ekstra, Color, Trim, Total) VALUES('"
&
&gt; &gt; > request.form("KundeNavn") & "','" & request.form("KundeTlf")
&
&gt; &gt; > "', '" & request.form("KundeFax") & "','" &
&gt; &gt; > request.form("KundeEmail") & "','" & request.form("Make") &
&gt; "','"
&gt; &gt; > & request.form("Model") & "','" & request.form("Version") &
&gt; "','"
&gt; &gt; > & request.form("Ekstra") & "','" & request.form("color") &
"','"
&gt; &gt; > & request.form("trim") & "'," & request.form("Total")& ")"
&gt; &gt; >
&gt; &gt; > 'sql = "INSERT INTO T_Ordre_Fra_Web (Navn, Tlf, Fax, Email,
&gt; &gt; > Make, Model, Version) VALUES('" & request.form("KundeNavn")
&
&gt; "',
&gt; &gt; > '" & request.form("KundeTlf") & "', '" &
&gt; request.form("KundeFax")
&gt; &gt; > & "', '" & request.form("KundeEmail") & "', '" &
&gt; &gt; > request.form("Make") & "', '" & request.form("Model") & "',
'" &
&gt; &gt; > request.form("Version") & "')"
&gt; &gt; >
&gt; &gt; > 'sql = "INSERT INTO T_Ordre_Fra_Web (Navn, Tlf, Fax, Email,
&gt; &gt; > Make, Model, Version, Trim, Color, Total) VALUES('" &
&gt; &gt; > request.form("KundeNavn") & "','" & request.form("KundeTlf")
&
&gt; &gt; > "', '" & request.form("KundeFax") & "','" &
&gt; &gt; > request.form("KundeEmail") & "','" & request.form("Make") &
&gt; "','"
&gt; &gt; > & request.form("Model") & "','" & request.form("Version") &
&gt; "','"
&gt; &gt; > & request.form("color") & "','" & request.form("trim") &
"'," &
&gt; &gt; > request.form("Total") & ")"
&gt; &gt; >
&gt; &gt; > 'sql = "INSERT INTO T_Ordre_Fra_Web (Navn) VALUES('" &
&gt; &gt; > request.form("KundeNavn") & "')"
&gt; &gt; >
&gt; &gt; > 'sql = "INSERT INTO T_Ordre_Fra_Web (Navn)
VALUES('KundeNavn')"
&gt; &gt; >
&gt; &gt; >
&gt; &gt; > response.write sql
&gt; &gt; >
&gt; &gt; > response.end
&gt; &gt; >
&gt; &gt; > 'dbCon.execute(sql)
&gt; &gt; >
&gt; &gt; > %>
> > >
> > > </body>
> > >
> > >
> > >
> > >
> > > Hvad er der da galt ???
> > >
> > > --
> > > Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP ???
> > > - Pædagoiske tutorials på dansk
> > > - Kom godt i gang med koderne
> > > KLIK HER! => http://www.html.dk/tutorials
> >
> >
>
>
> --
> Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP ???
> - Pædagoiske tutorials på dansk
> - Kom godt i gang med koderne
> KLIK HER! => http://www.html.dk/tutorials


--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP ???
- Pædagoiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! => http://www.html.dk/tutorials

Søg
Reklame
Statistik
Spørgsmål : 177557
Tips : 31968
Nyheder : 719565
Indlæg : 6408876
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste