ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #16  
Old June 27th, 2009, 09:09 AM
xzamer xzamer is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 15 xzamer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m
Reputation Power: 0
Ok So I tried what you suggested.

I replaced the following INSERT Query

sSQL = "INSERT into users_tbl (name, email, comments) values ('" & _
name & "', '" & email & "', '" & comments & "')"


to THIS select Query

sSQL = "SELECT * FROM users_tbl"
(Just selecting, no other command)

And I got a fine result... which probably means that my insert code is wrong? or what... :X becuase I checked well and the code seems just fine ehhh

Reply With Quote
  #17  
Old June 27th, 2009, 01:11 PM
don94403's Avatar
don94403 don94403 is offline
Contributing User
Click here for more information.
 
Join Date: Jan 2007
Location: Northern California
Posts: 2,848 don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 18 h 41 m 42 sec
Reputation Power: 562
Well, the process of debugging involves small, incremental steps to isolate the problem. You now know that (1) your web server can find your source file; (2) your web server is interpreting your asp code; (3) your web server is communicating with your database. I'd say that's a pretty good start, since you were asking essentially those questions, before. Now, let's go back and see what the remaining issue is. Is it an error message that complains about your query? That tells me that something is wrong with either the query or the data. So I'd check to see that all the variables in your query contain the values you think they are, and if that's true, then look at the syntax (which I think you have already done), and finally at whether what you're asking it to do makes sense, logically. Usually that "non-updateable" error is given when your query attempts to update a record, or records, that Access is unable to determine which record(s) to update. In your case, it's an Insert query, so all I can think of is that either it can't find the table, or the table is somehow locked (permissions) or something like that.
__________________
Experience is the thing you have left when everything else is gone.

Reply With Quote
  #18  
Old June 28th, 2009, 05:41 AM
xzamer xzamer is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 15 xzamer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m
Reputation Power: 0
No idea. ehh.

The file is READY for archiving, I didn't do anything to unauthorize and it does SELECT the columns.

I checked maybe the vaules were wrong or name of table / mdb but not.. everything seems just fine and yet I can't figure what is wrong, why can't i insert information to my table.

Everything seems ok with the code
Everything seems ok with the permission
Everything seems ok with the data I insert.

So. what the hell?
Looking forward for help

Thanks In advance!

Reply With Quote
  #19  
Old June 28th, 2009, 01:55 PM
don94403's Avatar
don94403 don94403 is offline
Contributing User
Click here for more information.
 
Join Date: Jan 2007
Location: Northern California
Posts: 2,848 don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 18 h 41 m 42 sec
Reputation Power: 562
I went back and looked at your original question. This is an ASP/web application. Hmmm. Have you previously been able to successfully insert new records to that table or database? If you have, possibly your database file has been corrupted, you might try a Compact & Repair operation on it. If this is your first attempt to write to this database, all I can think of is a possible configuration issue in your web server that allows your ASP to read from, but not write to your database.

I guess the next thing I would do is write a short test script to insert one record into that table, using the same connection string and just fill a couple of fields, to see whether your system is not allowing ANY inserts.

I hope someone else with more ASP experience will offer some suggestions.

Last edited by don94403 : June 28th, 2009 at 01:57 PM.

Reply With Quote
  #20  
Old June 28th, 2009, 05:16 PM
xzamer xzamer is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 15 xzamer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m
Reputation Power: 0
Quote:
Originally Posted by don94403
I guess the next thing I would do is write a short test script to insert one record into that table, using the same connection string and just fill a couple of fields, to see whether your system is not allowing ANY inserts.



Isn't it what i've just done? with the command?
I don't understand you, please give me the exact command you mean



I can write data into the table using the DB itself.
And It's not corrupt becuase I tried connecting the ASP to another database.

Reply With Quote
  #21  
Old June 28th, 2009, 06:01 PM
don94403's Avatar
don94403 don94403 is offline
Contributing User
Click here for more information.
 
Join Date: Jan 2007
Location: Northern California
Posts: 2,848 don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 18 h 41 m 42 sec
Reputation Power: 562
Quote:
Originally Posted by xzamer
Isn't it what i've just done? with the command?
I don't understand you, please give me the exact command you mean

No. Read what I wrote again. "write a short test script" doesn't mean sending a command from the command line or using Access directly. It means write an ASP script, which goes through a completely different process, which seems to be where the problem is. You have already eliminated the possibilities that the problem lies with the database itself.
Quote:
I can write data into the table using the DB itself.
And It's not corrupt becuase I tried connecting the ASP to another database.

I agree. So now you have to concentrate on what else in your process could be causing the error. That seems to leave the interface between the web server and ASP and your database. That's why you have to write an ASP script (a simple one, probably not more than 4 or 5 lines of code).

I'm not going to be able to be of much more help to you. I've written many hundreds of Access applications and many dozens of PHP/MySQL applications, but only one ASP/Access application.

Reply With Quote
  #22  
Old July 3rd, 2009, 08:07 AM
xzamer xzamer is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 15 xzamer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m
Reputation Power: 0
Quote:
Originally Posted by don94403
No. Read what I wrote again. "write a short test script" doesn't mean sending a command from the command line or using Access directly. It means write an ASP script, which goes through a completely different process, which seems to be where the problem is. You have already eliminated the possibilities that the problem lies with the database itself.

I agree. So now you have to concentrate on what else in your process could be causing the error. That seems to leave the interface between the web server and ASP and your database. That's why you have to write an ASP script (a simple one, probably not more than 4 or 5 lines of code).

I'm not going to be able to be of much more help to you. I've written many hundreds of Access applications and many dozens of PHP/MySQL applications, but only one ASP/Access application.



Still having problems with the issue.
It's a simple SQL command after all
I'm sure some1 does know the solution
Please help, thanks in advance!

Reply With Quote
  #23  
Old July 3rd, 2009, 08:23 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 3,416 sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 23 h 57 m 27 sec
Reputation Power: 1800
--> Moved to ASP Forum

I had a quick read of the thread but I'mnot sure what happened when you ran the test suggested by Don. What happens if you create a new .asp page in your folder then view it in the browser:
Code:
<html>
<head>
<title>SQL Test</title>
</head>
<body> 
<%

sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _ 
"Data Source=" & Server.MapPath("Users.mdb") 

Set cn = Server.CreateObject("ADODB.Connection")
cn.Open(sConnString)
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "select * FROM users_tbl"
Set rs = cn.Execute(sql)

Response.Write("<table><tr>")
For Each x In rs.Fields
	Response.Write("<td>" & x.Name & "</td>")
Next
Response.Write("</tr>")
While NOT rs.EOF
	Response.Write("<tr>")
	For Each x In rs.Fields
		Response.Write("<td>" & x.Value & "</td>")
	Next
	Response.Write("</tr>")
	rs.MoveNext
Wend
Response.Write("</table>")
rs.Close
cn.Close
Set cn = Nothing
%>
</body>

Reply With Quote
  #24  
Old July 4th, 2009, 02:23 PM
xzamer xzamer is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 15 xzamer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m
Reputation Power: 0
Quote:
Originally Posted by sync_or_swim
--> Moved to ASP Forum

I had a quick read of the thread but I'mnot sure what happened when you ran the test suggested by Don. What happens if you create a new .asp page in your folder then view it in the browser:
Code:
<html>
<head>
<title>SQL Test</title>
</head>
<body> 
<%

sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _ 
"Data Source=" & Server.MapPath("Users.mdb") 

Set cn = Server.CreateObject("ADODB.Connection")
cn.Open(sConnString)
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "select * FROM users_tbl"
Set rs = cn.Execute(sql)

Response.Write("<table><tr>")
For Each x In rs.Fields
	Response.Write("<td>" & x.Name & "</td>")
Next
Response.Write("</tr>")
While NOT rs.EOF
	Response.Write("<tr>")
	For Each x In rs.Fields
		Response.Write("<td>" & x.Value & "</td>")
	Next
	Response.Write("</tr>")
	rs.MoveNext
Wend
Response.Write("</table>")
rs.Close
cn.Close
Set cn = Nothing
%>
</body>



Sorry I dont understand.
Do you want me to create this ASP file without connecting it to any other page / form of my current files ?

And the code, did you already edit it according to my table and frields or should I fill the "x" with other values?
Thanks .

Reply With Quote
  #25  
Old July 8th, 2009, 09:43 PM
xzamer xzamer is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 15 xzamer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m
Reputation Power: 0
Ughh Stil looking for some help!

Thanks in advance.

Reply With Quote
  #26  
Old July 8th, 2009, 11:53 PM
keep_it_simple's Avatar
keep_it_simple keep_it_simple is offline
KIS
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Jul 2007
Location: USA
Posts: 1,530 keep_it_simple User rank is Lieutenant General (80000 - 90000 Reputation Level)keep_it_simple User rank is Lieutenant General (80000 - 90000 Reputation Level)keep_it_simple User rank is Lieutenant General (80000 - 90000 Reputation Level)keep_it_simple User rank is Lieutenant General (80000 - 90000 Reputation Level)keep_it_simple User rank is Lieutenant General (80000 - 90000 Reputation Level)keep_it_simple User rank is Lieutenant General (80000 - 90000 Reputation Level)keep_it_simple User rank is Lieutenant General (80000 - 90000 Reputation Level)keep_it_simple User rank is Lieutenant General (80000 - 90000 Reputation Level)keep_it_simple User rank is Lieutenant General (80000 - 90000 Reputation Level)keep_it_simple User rank is Lieutenant General (80000 - 90000 Reputation Level)keep_it_simple User rank is Lieutenant General (80000 - 90000 Reputation Level)keep_it_simple User rank is Lieutenant General (80000 - 90000 Reputation Level)keep_it_simple User rank is Lieutenant General (80000 - 90000 Reputation Level)keep_it_simple User rank is Lieutenant General (80000 - 90000 Reputation Level)keep_it_simple User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 18 h 49 m 10 sec
Reputation Power: 825
Send a message via Yahoo to keep_it_simple
as sos i did not go through the multiple posts thoroughly...what stuck out was a .asp page displaying the code versus executing...

i do believe don went through w/ you as far as 'where' these files should reside...if you are still seeing code then i'd have to guess you do not have these files on the web server...

also, as don mentioned a test script is needed...are you able to execute asp code at all?

for example if you save a file called test.asp on the web server and open it up via iis

test.asp
Code:
<%=time%>


should display the current time on your computer


...and not to overlook the obvious

1. what operating system are you running? xp pro/home edition/vista/linux/etc/

2. are you using microsoft Internet Information Server (IIS) and is it installed (from the cd)?

control panel/add or remove windows components/(iis is checked)

as sos mentioned i too do not see where/if you debugged an asp page


<edit>
i read a little more...this is a common error and there is a 'sticky' in this forum that will help you resolve the not updateable problem:

http://forums.aspfree.com/asp-devel...uide-96087.html

also...a wealth of information is on google searches..it's highly suggested to search for the key words and/or error description you are getting...you probably would have found the fix long ago w/ a little effort versus relying on volunteer support
__________________
Please give respect to those that helped solve an issue by clicking on the reputation icon

Last edited by keep_it_simple : July 9th, 2009 at 01:53 AM.

Reply With Quote
  #27  
Old July 10th, 2009, 06:42 AM
traxxion traxxion is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 5 traxxion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 8 m 35 sec
Reputation Power: 0
Question How about...

Quote:
Originally Posted by xzamer
Still having problems with the issue.
It's a simple SQL command after all
I'm sure some1 does know the solution
Please help, thanks in advance!


Yes, its a simple command, so I would guess there is a problem with the data being submitted, or the field type.

Quote:
sSQL = "INSERT into users_tbl (name, email, comments) values ('" & _
name & "', '" & email & "', '" & comments & "')"


In your ASP you should have something like:
_name = Request.Form("_name") <--- is this field actually called _name and not name?
email = Request.Form("email")
comments=Request.Form("comments")

....then your insert and then the connection and execute bits.
Are the fields in the users_tbl all just plain TEXT fields? Put - Response.Write(sSQL)

... into your ASP page and comment out the connect/execute bits. Does the INSERT statement and the data in it look 100%?

What exactly happens when you use the INSERT code?
I would post the error that you are getting:-

Sorry if I'm on the wrong track, it just seems that the issue is the data from what I have read.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > Problem with inserting data to ms access databse


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
Stay green...Green IT