Click here to Skip to main content
15,888,802 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Blank Asp webpage. Pin
miss7869-Oct-12 3:54
miss7869-Oct-12 3:54 
QuestionQuestion about variables in Classic ASP VBScript Pin
Diego Carrion7-Oct-12 5:32
Diego Carrion7-Oct-12 5:32 
AnswerRe: Question about variables in Classic ASP VBScript Pin
Brisingr Aerowing7-Oct-12 6:10
professionalBrisingr Aerowing7-Oct-12 6:10 
GeneralRe: Question about variables in Classic ASP VBScript Pin
Diego Carrion7-Oct-12 6:19
Diego Carrion7-Oct-12 6:19 
GeneralRe: Question about variables in Classic ASP VBScript Pin
Wes Aday7-Oct-12 6:38
professionalWes Aday7-Oct-12 6:38 
GeneralRe: Question about variables in Classic ASP VBScript Pin
Diego Carrion7-Oct-12 7:02
Diego Carrion7-Oct-12 7:02 
GeneralRe: Question about variables in Classic ASP VBScript Pin
ChandraRam7-Oct-12 20:55
ChandraRam7-Oct-12 20:55 
GeneralRe: Question about variables in Classic ASP VBScript Pin
Diego Carrion8-Oct-12 2:20
Diego Carrion8-Oct-12 2:20 
Thank you for taking your time and helping me out. I did over 12 hours of "Research" on this last night and I couldn't get a straight answer from the internet. I'm still getting a data type mismatch when I input all the information.

I noticed I have two fields that I have never worked before. In access I have 2 fields that read memo as type and 2 that are in the currency format. Would I follow '" "' for memos and " " for currency or do they have a determined way to input data. Visual Studio debugger keeps telling me there's a problem with this certain line: connection.execute(sSQL).

My code reads as follows:

Employee_ID=Request.Form("Employee_ID")'Number *field in access*
Customer_ID=Request.Form("Customer_ID")'Number
Order_Date=Request.Form("Order_Date")'Date/Time
Shipped_Date=Request.Form("Shipped_Date")'Date/Time
Shipper_ID=Request.Form("Shipper_ID")'Number
Ship_Name=Request.Form("Ship_Name")'Text
Ship_Address=Request.Form("Ship_Address")'Memo
Ship_City=Request.Form("Ship_City")'Text
Ship_State_Province=Request.Form("Ship_State_Province")'Text
Ship_Zip_Postal_Code=Request.Form("Ship_Zip_Postal_Code")'Text
Ship_Country_Region=Request.Form("Ship_Country_Region")'Text
Shipping_Fee=Request.Form("Shipping_Fee")'Currency
Taxes=Request.Form("Taxes")'Currency
Payment_Type=Request.Form("Payment_Type")'Text
Paid_Date=Request.Form("Paid_Date")'Date/Time
Notes=Request.Form("Notes")'Memo
Tax_Rate=Request.Form("Tax_Rate")'Number
Tax_Status=Request.Form("Tax_Status")'Number
Status_ID=Request.Form("Status_ID")'Number

sSQL = "INSERT INTO Orders (Employee_ID, Customer_ID, Order_Date, Shipped_Date, Shipper_ID, Ship_Name, Ship_Address, Ship_City, Ship_State_Province, Ship_Zip_Postal_Code, Ship_Country_Region, Shipping_Fee, Taxes, Payment_Type, Paid_Date, Notes, Tax_Rate, Tax_Status, Status_ID) Values (" & Employee_ID & ", " & Customer_ID & ", #" & Order_Date & "#, #" & Shipped_Date & "#, " & Shipper_ID & ", '" & Ship_Name & "', '" & Ship_Address & "','" & Ship_City & "', '" & Ship_State_Province & "', '" & Ship_Zip_Postal_Code & "', '" & Ship_Country_Region & "', " & Shipping_Fee & ", " & Taxes & ", '" & Payment_Type & "', #" & Paid_Date & "#, '" & Notes & "', " & Tax_Rate & ", " & Tax_Status & ", " & Status_ID & ")"

sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.MapPath("/database/Examen.mdb")
Set connection = Server.CreateObject("ADODB.Connection")

connection.Open(sConnString)
connection.execute(sSQL)


response.write "The form information was inserted successfully."

connection.Close
Set connection = Nothing
%>

I don't expect for anyone to solve the problem for me, I'm just simply not experienced enough with html and asp vbscript quoting to figure this out on my own as I've been working on this all weekend long since Thursday and I've gotten nowhere. I've created around 7 connections and once I get this going, I feel confident enough that the others will work.
GeneralRe: Question about variables in Classic ASP VBScript Pin
ChandraRam8-Oct-12 2:23
ChandraRam8-Oct-12 2:23 
GeneralRe: Question about variables in Classic ASP VBScript Pin
Diego Carrion8-Oct-12 2:26
Diego Carrion8-Oct-12 2:26 
GeneralRe: Question about variables in Classic ASP VBScript Pin
Brisingr Aerowing7-Oct-12 6:39
professionalBrisingr Aerowing7-Oct-12 6:39 
GeneralRe: Question about variables in Classic ASP VBScript Pin
Dave Kreskowiak7-Oct-12 8:15
mveDave Kreskowiak7-Oct-12 8:15 
GeneralRe: Question about variables in Classic ASP VBScript Pin
Diego Carrion7-Oct-12 9:25
Diego Carrion7-Oct-12 9:25 
GeneralRe: Question about variables in Classic ASP VBScript Pin
Dave Kreskowiak7-Oct-12 10:11
mveDave Kreskowiak7-Oct-12 10:11 
GeneralRe: Question about variables in Classic ASP VBScript Pin
Diego Carrion7-Oct-12 10:23
Diego Carrion7-Oct-12 10:23 
Questionerror Pin
uday87227-Oct-12 3:22
uday87227-Oct-12 3:22 
AnswerRe: error Pin
Richard MacCutchan7-Oct-12 4:47
mveRichard MacCutchan7-Oct-12 4:47 
GeneralRe: error Pin
OriginalGriff7-Oct-12 5:44
mveOriginalGriff7-Oct-12 5:44 
GeneralRe: error Pin
Richard MacCutchan7-Oct-12 6:39
mveRichard MacCutchan7-Oct-12 6:39 
QuestionSQL Query for dates Pin
SPSandy7-Oct-12 2:17
SPSandy7-Oct-12 2:17 
AnswerRe: SQL Query for dates Pin
Richard MacCutchan7-Oct-12 4:50
mveRichard MacCutchan7-Oct-12 4:50 
AnswerRe: SQL Query for dates Pin
Eddy Vluggen8-Oct-12 2:37
professionalEddy Vluggen8-Oct-12 2:37 
GeneralRe: SQL Query for dates Pin
Johan Hakkesteegt10-Oct-12 23:38
Johan Hakkesteegt10-Oct-12 23:38 
GeneralRe: SQL Query for dates Pin
SPSandy15-Oct-12 4:32
SPSandy15-Oct-12 4:32 
AnswerRe: SQL Query for dates Pin
Eddy Vluggen15-Oct-12 4:54
professionalEddy Vluggen15-Oct-12 4:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.