|
dear friends
I have simple page for enquirey form which contains the code as below
<%
Function ChkString(string)
If string = "" Then string = " "
ChkString = Replace(string, "'", "''")
End Function
dim First_Name,Last_Name,Title,Company,Address1,CmbCountry,ZipCode,cmbEtype,EmailId,Comments,entdate
dim sql_insert
FirstName=ChkString(Request.form("First_Name"))
LastName=ChkString(Request.form("LastName"))
Title=ChkString(Request.form("Title"))
Company=ChkString(Request.form("Company"))
Address1=ChkString(Request.form("Address1"))
CmbCountry=ChkString(Request.form("CmbCountry"))
ZipCode=ChkString(Request.form("ZipCode"))
EmailId=ChkString(Request.form("EmailId"))
cmbEtype=ChkString(Request.form("cmbEtype"))
Comments=ChkString(Request.form("Comments"))
entdate=now()
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open("c:/inetpub/wwwroot/altadawi/Database/AlTadawi.mdb")
set rs = Server.CreateObject("ADODB.recordset")
rs.cursorlocation =3
sql_insert = "insert into EnqDetail (Fname, Lname, Etitle, Ecompany,Address1,Country,ZipCode,EType,emailId,EnqDet,EntryDate) values ('"
sql_insert=sql_insert & FirstName & "', '" & LastName & "', '" & Title & "', '" & Company & "', '" & Address1 & "', '" & CmbCountry & "', '" & ZipCode & "', '" & cmbEtype & "', '" & EmailId & "', '" & Comments & "','" & entdate & "')"
response.write(sql_insert)
rs.Open sql_insert, conn,1,2
rs.close
Set RS = Nothing
conn.close
%>
when I submit this page it gives me error as below
Error Type:
Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.
/altadawi/EnqSubmit.asp, line 38
Please can u tell me where is the problem in my code.
Your quick response will be highly appreciated.
Thankx
Murtuza Patel
|
|
|
|
|
You haven't given the IUSR_[machinname] account write permission to the database file.
---
b { font-weight: normal; }
|
|
|
|
|
You are using SQL injection! This is not a secure way of creating a SQL command. Also, you are concatenating a date to the SQL command. This is probably causing your error. If you insist upon using SQL injection, you need to convert the date to a string and, in your SQL command, have a SQL function that converts a string to a date. Otherwise, USE PARAMETERS!
-- modified at 19:27 Wednesday 15th February, 2006
|
|
|
|
|
Anyone can give the source code of a UPnP java media server and a media player
|
|
|
|
|
How does PHP compare to Javascript?
Are there any good books or web sites that you can recommend for learning PHP?
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
They don´t...
PHP is server side open source cross platform
Javascript is client side
They have strengths and weaknesses but do mix well.
PHP at version 5 is a mature OOP language and I use it to implement business logic & database patterns over a MySQL database serving pages with embedded Javascript to handle UI patterns (thanks yahoo btw)
A good book? Unusally I think the dummies PHP book is a good place to start (let the flames begin)
Is this the first PHP question on CP
And why am I answering
Hope this helps?
|
|
|
|
|
Thanks for the response.
Dummies books are written to my level of comprehension so I will get a copy.
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
Jeremy Thornton wrote: PHP is server side open source cross platform
Javascript is client side
PHP can be used on the client side, although it's an unusual use. JavaScript is used on both server and client side.
Steve
|
|
|
|
|
true, but didnt want over complicate things and as the most popular language of all time Javascript doesn´t need much promotion. So I thought giving PHP(5) a shove in this august site might be fun if a little like shouting into the wind
wikipedia and www.devarticles.com have good info on Javascript for the full story...
php.org has what else you might need too...
|
|
|
|
|
have u know any trick to change any email_id's....
like of yahoo,rediff etc.
|
|
|
|
|
Try wzw.hakzor.con
and yes I did mean con not com!
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
Hi, I am currently trying to complete a 90% working Intranet site for my company and the developer left a long time ago.
The site has been developed with ASP.net and C# both of which I'm not familar with but trying to piece my way with my J2EE background.
The main issue I have is that the site was supposedly developed with security features to restrict access to pages / parts of pages based on the users' AD Group Membership.
The developer had the following in the web.config file
<configuration>
....
<appSettings>
<!-- internal security to Active Directory group mapping -->
<!-- all mappings are in the format:
<add key="[internalRole]" value="[Active Directory Security Group]" />
-->
<!-- Standard user groups -->
<add key="iUser" value="OurDomain\Domain Users" />
<add key="iUserIT" value="OutDomain\IT Dept" />
...
<configuration/>
However nowhere in the rest of the application with code or config files can I find any reference to anything such as iUser, iUserIT etc etc.
The config file shows that Windows as opposed to Forms based authorisation is used and I have been searching the web for tutorials and found that "Roles" can be used to restrict access to a particular directory / file by using a construct as follows,
<location path="myPage.aspx">
<system.web>
<authorization>
<allow roles="AdminRole" />
<deny users="*" />
</authorization>
</system.web>
</location>
I have a number of questions :
1) If I can define as above which Role can access each resource, how/where do I define which windows Group pertains to each Role?
2) Is there a simple way of using the Users windows account to look for a particular Group, ie so that I can stick a function at the head of certain pages to allow / deny access to content based on their AD Group membership.
I'm sure this should only be a 4-5 liner but I haven't been able to find anything so far.
Any help would be greatly appreciated,
Damian Del Campo
|
|
|
|
|
can any one tell me the whole procedures as well as
code to make any own web site.
|
|
|
|
|
well if you are able to make a simple html 0r dhtml pages and link them.You are having the code.
for making a website following things must be done on your machine.
1. Install IIS.
2. right click at "my computer" go to manage section.
3. then click on "services and applications" and then right click on "IIS services".
4. You are having a option for making the "website".
5. now follow the instructions.
vivek
|
|
|
|
|
hi,
Can anyone help me in -> how to search a word or text in a web page ? .
I using ASP & Sql Sever 2000.
vivek
|
|
|
|
|
You mean how to search the database?
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
-- modified at 7:39 Tuesday 14th February, 2006
|
|
|
|
|
just simple using SELECT query....
<< >>
|
|
|
|
|
Dear all
I used the method showModalDialog("url") to diaplay a modal dialog box.But i am gettin displayed with both the dialog box and browser window of the specified URL.
I need only dialog box to be displayed.
Please help me to resolve this problem
Daewoo
|
|
|
|
|
Show your code.
---
b { font-weight: normal; }
|
|
|
|
|
uid=window.showModalDialog("mod.htm","","dialogWidth:260px;dialogHeight:300px");
Daewoo
|
|
|
|
|
That doesn't do anything but showing the dialog.
Do you mean that the browser window still is shown while the dialog is open? If so, that is normal, and there is nothing you can do about it.
---
b { font-weight: normal; }
|
|
|
|
|
Dear Guffa sir,
The problem is as follows:
First,You consider the main window where showDialog is written and now it pops
a dailog window but along with this, the url mentioned in showModalDialog is
getting opened in a browser window too.
Please resolve this problem.
Regards
Rukesh D
Daewoo
|
|
|
|
|
The code that you have shown doesn't do that. You must have some more code that is executed.
---
b { font-weight: normal; }
|
|
|
|
|
well you might use the close method after viewing the dialog, but I dont think its possible to view only the message.
----
Dim Sleepy as Boolean = True
If Me.Sleepy = True Then
Goto Sleep
End If
----
|
|
|
|
|
Hi
In one .aspx page, the width of a cell is 150 px. During testing I entered a very long string like "THIs a verrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrryyyyyyyyyyy long string". Now the problem is that the cell auromatically widens to accomodate the content. But, I want it to wrap the extra text to next line.
How can I do this? Please advice.
Thanks
|
|
|
|