Har du provat att skriva ut vad resultatet i sqlstmt2 blir? Response.write SQLStmt2
Hejhej,
Jag gör en undersökning här http://www.tradesolo.com/undersokning/
Jag har fått fel i koden, vilket är enligt förväntningar eftersom jag var jäkligt trött när jag gjorde den. Jag har ändrat alla felmeddelanden som kommer upp, men nu står det bara att "sidan kan inte visas, intern serverfel". Jag har alltså inställningen på att jag borde se felmeddelanden, men ändå kommer den sidan upp. Varför blir det så?
Postar även koden om det kan hjälpa er. Men den egentliga frågan är varför jag inte får felmedelande. Om jag får det tror (hoppas) jag jag borde kunde trixa ut svaret. (Alla värden i databasen är tal, text eller PM, och icke-obligatoriska. Jag testar genom att trycka skicka direkt, utan att skriva in några värden. Testa gärna om ni vill se själva.)
Set Connection = Server.CreateObject("adodb.Connection")
Connection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("\...\pkdb.mdb")
Function DTRS(sText)
sText = Replace(sText, "'", "")
sText = Replace(sText, ",", ".")
sText = Replace(sText, """", "")
sText = Replace(sText, "<", "")
DTRS = sText
End function
'"text"'
SQLStmt2 = "Insert Into Networks"
SQLStmt2 = SQLStmt2 & "(Time, Stakes, Rake, Tables, Hands, Site, Sitenetwork, Sitesupport, Siterakeback, Siteplayers, Sitesoftware, Siteeu, Siteother, Primaplayers, Primasafety, Primasoftware, Primatotal, Primaother, B2Bplayers, B2Bsafety, B2Bsoftware, B2Btotal, B2Bother, Tainplayers, Tainsafety, Tainsoftware, Taintotal, Tainother, Ongameplayers, Ongamesafety, Ongamesoftware, Ongametotal, Ongameother, Loyalty, Change, Changeother, Ovrigt, Email) "
SQLStmt2 = SQLStmt2 & "VALUES(" & DTRS(request("speltid")) & ", " & DTRS(request("stakes")) & ", " & DTRS(request("rake")) & ", " & DTRS(request("tables")) & ", " & DTRS(request("hands")) & ", '" & DTRS(request("site")) & "', " & DTRS(request("natsida")) & ", " & DTRS(request("sitesupport")) & ", " & DTRS(request("siterakeback")) & ", " & DTRS(request("siteplayers")) & ", " & DTRS(request("sitesoftware")) & ", " & DTRS(request("siteeu")) & ", " & DTRS(request("siteother")) & ", " & DTRS(request("primaplayers")) & ", " & DTRS(request("primasafety")) & ", " & DTRS(request("primasoftware")) & ", " & DTRS(request("primatotal")) & ", '" & DTRS(request("primaother")) & ")"', " & DTRS(request("b2bplayers")) & ", " & DTRS(request("b2bsafety")) & "")) & ", " & DTRS(request("b2bsoftware")) & ", " & DTRS(request("b2btotal")) & ", '" & DTRS(request("b2bother")) & ")"', " & DTRS(request("tainplayers")) & ", " & DTRS(request("tainsafety")) & "")) & ", " & DTRS(request("tainsoftware")) & ", " & DTRS(request("taintotal")) & ", '" & DTRS(request("tainother")) & ")"', " & DTRS(request("ongameplayers")) & ", " & DTRS(request("ongamesafety")) & "")) & ", " & DTRS(request("ongamesoftware")) & ", " & DTRS(request("ongametotal")) & ", '" & DTRS(request("ongameother")) & ")"', " & DTRS(request("loyalty")) & "")) & ", " & DTRS(request("change")) & "")) & ", '" & DTRS(request("changeother")) & "")) & "', '" & DTRS(request("other")) & "")) & "', '" & DTRS(request("email")) & "")) & "')"
Connection.Execute(SQLStmt2)
Response.Write SQLStmt2
Connection.Close
Set Connection=Nothing
