Can anyone tell me why this isn't working?
cid, uid, u, d, and s are numbers
sd, ed are dates
c is text
Thanks!
myC = "INSERT INTO tbl_requests(req_client, req_user, req_unit_id,
req_cat_id, req_shift_id, req_start, req_end, req_sp_req,
req_submitted, req_status) VALUES" & "(" & cid & ", " & uid & ", " &
u & ", " & d & ", " & s & ", #" & sd & "#, #" & ed & "#, '" & c &
"', #" & now() & "#, " & 1 & ")"
conn.execute myc 3 1268
RichCrider wrote: Can anyone tell me why this isn't working?
cid, uid, u, d, and s are numbers sd, ed are dates c is text
The datatypes of the variables are not really relevant. It is the datatypes
of the table columns that we need to hear about.
Thanks!
myC = "INSERT INTO tbl_requests(req_client, req_user, req_unit_id, req_cat_id, req_shift_id, req_start, req_end, req_sp_req, req_submitted, req_status) VALUES" & "(" & cid & ", " & uid & ", " & u & ", " & d & ", " & s & ", #" & sd & "#, #" & ed & "#, '" & c & "', #" & now() & "#, " & 1 & ")"
conn.execute myc
Show us the result of
response.write myc
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
RichCrider wrote: Can anyone tell me why this isn't working?
Also, tell us what you mean by "isn't working". We aren't looking over your
shoulder. Are you getting error messages? Incorrect results?
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
the data types of the columns are numbers, dates and text as listed
above (I listed variable names, not column names in my earlier post.)
If I try to execute it from the ASP page, I get:
"There is a problem with the page you are trying to reach and it cannot
be displayed." Everything on the page except insert and execute works
correctly.
Response.write returns the following:
INSERT INTO tbl_requests(req_client, req_user, req_unit_id, req_cat_id,
req_shift_id, req_start, req_end, req_sp_req, req_submitted, req_status)
VALUES(1, 1, 1, 1, 1, #1/1/2004#, #1/5/2004#, 'Comments', #3/24/2004
12:47:37 PM#, 1)
thanks for your help!
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Alex |
last post by:
Hello
Im working on project for my college, nevermind (but it urgent :((()...
So I have this code example (in VS 6.0) in main class :
REAL *Input;
....
|
by: Ray |
last post by:
Stop me if you've heard this, but I am running Access 2002 and all of
a sudden, if I design a particular form (it's been working fine for
ages), Access crashes rather than open it in design view.
...
|
by: bettervssremoting |
last post by:
To view the full article, please visit
http://www.BetterVssRemoting.com
Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere
and VSS Remoting
This article makes a detailed...
|
by: geodev |
last post by:
I’m copying data across from an Access database to an MSDE database through
the use of some vb.net code.
Unfortunately the application crashes when it goes to copy across data, in
particular...
|
by: Sarah |
last post by:
I need to access some data on a server. I can access it directly using UNC
(i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network
drive resource (S:\Path\FileName).
Here is my...
| |
by: lesperancer |
last post by:
I've got an access97 reporting mdb that pulls data (77,000 rows) from a
sql server table into a local table to run reports
if the local table is part of the reporting MDB, the insert statement...
|
by: mark_aok |
last post by:
Hi all,
I have a split database. Both the forms, and the tables are stored on
a shared network drive (this is Access 2003).
The users use the forms, and the tables on the network drive, there...
|
by: bradhs |
last post by:
Hello,
Microsfot Access 2003 crashes constantly and randomly on Vista. I cant Compact and Repair, import into a new ADP file, etc... It crashes while opening a form, moving objects around in a...
|
by: John |
last post by:
I am looking for VBA code that will work with Access 2003 to enable
dragging and dropping a file/folder name from Windows XP Explorer into
an Access form's text box. This is a common functionality...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |