netcracker
-
Posts
85 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by netcracker
-
-
remove the last << , >> comma:
sql="UPDATE tblCustomer SET CustomerID="' & Request.Form("CustomerID") & "'," sql=sql & "Last_Name='" & Request.Form("Last_Name") & "',"sql=sql & "First_Name='" & Request.Form("First_Name") & "',"sql=sql & "Address1='" & Request.Form("Address1") & "',"sql=sql & "Address2='" & Request.Form("Address2") & "',"sql=sql & "Address3='" & Request.Form("Address3") & "',"sql=sql & "Post_Code='" & Request.Form("Post_Code") & "',"sql=sql & "Telephone1='" & Request.Form("Telephone1") & "',"sql=sql & "Telephone2='" & Request.Form("Telephone2") & "',"WHERE tblCustomer.[CustomerID]=" & CustomerID "
..."Telephone2='" & Request.Form("Telephone2") & "'"...
-
In one of my earlier posts, i have instruced you on how to alow the DB to accept changes. It is a posibility that your DB is ReadOnly or the security group "Everyone" doesn't have the wright to make changes.I thought you've already checked that !
-
1. is the DB readonly; do Eeryone group has read/write permissons ?!2. use response.write command to see what data is being sent from the form and thoroughly check it !3. set ALL fields in the table to be TEXT, allow them to be empty and not required! once you've done that, use the ' character in the sql INSERT INTO/UPDATE statementgive it a shot !
-
try using this liners.Open "Select * from tblCustomer where tblCustomer.[CustomerID]=" & CustomerID , connlike thisrs.Open "Select * from tblCustomer where CustomerID = " & CustomerID & "", connI'm guessing now, although it does look a bit suspect
-
it should be like this:
select * from table where date between #" date1 "# and #" date2 "#,conn
-
if the fields "telephone1" and so on are NUMERIC then remove the ' character:
is this a mind-buthering post or what ?! come on guys, what's wrong with this code?!?! let's make a BRAINSTORMsql=sql & "Telephone1= " & Request.Form("Telephone1") & "," -
what does this give you ?
Response.Write(sql)
-
have a look:
IT IS NORMAL TO SAY THAT !! but it does not mean it !!! oh, man...give it a shot like this:if Request.form("action")="Save" then CustomerID=Request.Form("CustomerID") sql="UPDATE tblCustomer SET CustomerID="' & Request.Form("CustomerID") & "'," sql=sql & "Last_Name='" & Request.Form("Last_Name") & "'," sql=sql & "First_Name='" & Request.Form("First_Name") & "'," sql=sql & "Address1='" & Request.Form("Address1") & "'," sql=sql & "Address2='" & Request.Form("Address2") & "'," sql=sql & "Address3='" & Request.Form("Address3") & "'," sql=sql & "Post_Code='" & Request.Form("Post_Code") & "'," sql=sql & "Telephone1='" & Request.Form("Telephone1") & "'," sql=sql & "Telephone2='" & Request.Form("Telephone2") & "'," WHERE tblCustomer.[CustomerID]=" & CustomerID "Response.Write("Submitting records has been disabled from this demo")end ifif Request.form("action")="Save" then CustomerID=Request.Form("CustomerID") sql="UPDATE tblCustomer SET CustomerID="' & Request.Form("CustomerID") & "'," sql=sql & "Last_Name='" & Request.Form("Last_Name") & "'," sql=sql & "First_Name='" & Request.Form("First_Name") & "'," sql=sql & "Address1='" & Request.Form("Address1") & "'," sql=sql & "Address2='" & Request.Form("Address2") & "'," sql=sql & "Address3='" & Request.Form("Address3") & "'," sql=sql & "Post_Code='" & Request.Form("Post_Code") & "'," sql=sql & "Telephone1='" & Request.Form("Telephone1") & "'," sql=sql & "Telephone2='" & Request.Form("Telephone2") & "'," WHERE tblCustomer.[CustomerID]=" & CustomerID " Response.Write(" yuppy, we did it !!")else Response.Write("Submitting records has been disabled from this demo")end if
-
read the tutorials !or the help in MSAccess [press F1 ] !u might as well use GOOGLEits access and how would i go about setting the database to accept null -
in any windows explorer window in the TOOLS menu click "Folder Options" -> VIEW -> and the last one on the list should be "Use simple file sharing..." = Uncheck that!then try again as i've instructed you in my previous postkeep in touch
-
there is another way, if u don't like to lose yourself in too many tables...it is not exactly alignment, bt it looks the way you want it.u may insert a "spacer" between the buttons. a spacer is a 1x1 px transparent gif, to which you give the height 1 and the width... any value as to look good on ypur page.this is just another way, it is your choice in the endnot sure how you go about it without tables, without experimenting with divs. -
is the drive with the database ntfs or fat32 ?!if it is ntfs, right click the folder containing the database and select "security" - "add..." - "advanced" - "find now" an then look for the group called "everyone" ! then click OK to the previous windows to confirm the addmition until you get back to the properties window.click "everyone" (the group that you have just added) and then sellect "full control".try it like this, see what happends.oh, if the partition table is fat32, I donnow how to do it
-
dude, are u doing this on localhost or a server of your own? or are you doing it from their server?! maybe the database is readonly or there is a write privelledge needed.the code should work as it is!do this on your pc. insltall IIS and run it for your self
-
Do the records get deleted or not ?!?!if not: 1. try naming the buttons save/delete... 2. see if user "everyone" has the read/write capability for the database ! 3. check readonly attributes for that database or the containing folder...see what happens...
-
View Pictures
in ASP
it's all the same...have it something like this:i have looked at the ASP and ADO tutorials on the site but the coding does not seem to extarct pictures, only text from an Access tabel.... bla bla ...'open connection to db that has the fields containing the path of the imageid = request (id)set conn = server.createobject("adodb.connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.mappath("database_name.mdb"))set rs = server.createobject("ADODB.recordset")rs.open "select * from table_name where id = ' id ' "", conn... bla bla ... and finally<img src='<%=rs("field_name")%>' ... ><< rs("field_name") >> is the field with the path
you shuld get the ideea -
use it like this:just look at my codebla bla bla...rs.open "select * from tkelas where nip like '"&nip&"' ",conn...invalid character???how should I write??
it will surely workrs.open "select * from tkelas where nip like '%" & nip & "%' ",conn -
try it like this:
set conn = server.createobject("adodb.connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.mappath("...path/database.mdb"))set rs = server.createobject("ADODB.recordset") -
hmmm... this means u r not using the NTFS file system format... I just cannot remember how to allow permissons on FAT32 table... however, u might try disabling the "simple file sharing" option from "folder option" for one... hope u'll do just fine...Still cant find the security tab...but when I tried at another pc, the security tab appeared...how come??is there something wrong with my windows? or User?because, I logged as Administrator already...any idea??anyway thanks to you - aspnetguy,akasha and netcracker-...the problem has been solvedbut I'm still curious.... -
try using get instead of post.
<form method="get" action="update.asp">
the "post"method requires "taking" the value with "request.querystring" not "request.form"....I think ...it's a gues...
-
That means the DB is not updateble... duh ... ok. seriusly, check wether the db is readonly and wether "everyone" group has read/write wrights on it.that's allError Type:Microsoft JET Database Engine (0x80004005)Operation must use an updateable query./web_nilai/add_confirm.asp, line 10 -
THX everyone !I managed to solved it by server.URLencode(rs.fields.item("blabla"))and then everything went well.thanks a lot
-
it's a MS Acces DB... so far.It may eventualy go on a SQL server but it is not certain yet.So far, on my IIS it returns an error.it is expected though... i mean look at the link:
the server is confused...whole path/file.asp?word=M&M -
I need to do a search on a db but the string contains characters like &.Say, i search for "M&M" ... the result will be an error because of that character.How do I get the values with &, and how do I do the searh ?in my case i get the value by querystring, so i think i need to convert that character to something else... but what and how !?Anyone stumbled upon that before ?!THX
-
THX, manthis is a great script!!we make a good team You and I
Retreiving text from a text box
in ASP
Posted
the request.form command DOES get the value of a textbox too.to make sure you are getting the data try inserting in the page that recieves the form the command
and see if it returns what you send.