Syed,
I will take a stab at this, although I think I would need to see more code to be
of more help.
1 - Change your form method to "post":
<form name="form1" action="ThisPage.asp" method="post">
<input type="hidden" name="IsSubmitted">
<input type="text" name="Text1">
<input type="text" name="Text2">
<input type="text" name="Text3">
<input type="submit">
</form>
2 - Change your code at the top of this page to:
<%
If Request.Form("IsSubmitted") Then
'The page was submitted. Continue
Dim strText1, strText2, strText3
Dim oConn, oRS, sSQL
'Get our values into variables.
strText1 = Request.Form("Text1")
strText2 = Request.Form("Text2")
strText3 = Request.Form("Text3")
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("abc.mdb"))
sSQL= "INSERT INTO Info (Field1, Field2, Field3) VALUES ('" & strText1 & "','"
& strText2 & "','" & strText3 & "')"
Set oRS = oConn.Execute(sSQL)
oConn.Close
Set oRS = Nothing
Set oConn = Nothing
End If
%>
*** This is untested, I am typing it directly into this email. ***
3) Send us a more specific error. Assuming your using Internet Explorer, go to:
Tools --> Internet Options --> Advanced --> Uncheck 'Show Friendly HTTP Error
Messages'.
If you continue to have problems, post the technical error.
HTH,
Mark
syed hassan <lorany21k@...> wrote:
Dear Memebers
I am new to ASP I have to build Admin Page using ASP which must be capable of
Add,Delete,Update a Record
My Question are
1. In order to Add a record How can I get Values from field i.e. I have three
Text Boxes named text1,text2,text3 respectively two buttons 1 for Submit and
other for Reset
Form Actio is "Get"
I am using following Qury
I am just writing ASP code It must be noted that all the fields in Table are
Text Type
<%
Response.Expires = -1000
Dim oConn
Dim oRS
Dim sSQL
Dim sColor
Dim GetVal
If Category<>"" Then
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("abc.mdb"))
sSQL= "INSERT INTO Info VALUES ('" & text1 & "','" & text2 & "','" & text3 &
"')"
Set oRS = oConn.Execute(sSQL)
oConn.Close
Set oRS = Nothing
Set oConn = Nothing
end if
%>
i have also tryied
sSQL= "INSERT INTO info VALUES ('p','p','d')
but I am getting HTTP error what is wrong with this Query ?
when I use Query to retrive Data it works fine but whenever I try to perform
Add,Delete,Update operations I get HTTP error
Plz help me to solve this Problem
Thanks in Advance
Munawer
---------------------------------
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
[Non-text portions of this message have been removed]
'===========================================================
Archive : http://ReliableAnswers.com/YG/msg?asp-faq
Files : http://ReliableAnswers.com/YG/files?asp-faq
Group : http://ReliableAnswers.com/YG/group?asp-faq
Subscribe : http://ReliableAnswers.com/YG/sub?asp-faq
Unsubscribe : http://ReliableAnswers.com/YG/unsub?asp-faq
Attachments : Not Permitted
'===========================================================
Yahoo! Groups SponsorADVERTISEMENT
---------------------------------
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/asp-FAQ/
To unsubscribe from this group, send an email to:
asp-FAQ-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
Dear Memebers
I am new to ASP I have to build Admin Page using ASP which must be capable of
Add,Delete,Update a Record
My Question are
1. In order to Add a record How can I get Values from field i.e. I have three
Text Boxes named text1,text2,text3 respectively two buttons 1 for Submit and
other for Reset
Form Actio is "Get"
I am using following Qury
I am just writing ASP code It must be noted that all the fields in Table are
Text Type
<%
Response.Expires = -1000
Dim oConn
Dim oRS
Dim sSQL
Dim sColor
Dim GetVal
If Category<>"" Then
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("abc.mdb"))
sSQL= "INSERT INTO Info VALUES ('" & text1 & "','" & text2 & "','" & text3 &
"')"
Set oRS = oConn.Execute(sSQL)
oConn.Close
Set oRS = Nothing
Set oConn = Nothing
end if
%>
i have also tryied
sSQL= "INSERT INTO info VALUES ('p','p','d')
but I am getting HTTP error what is wrong with this Query ?
when I use Query to retrive Data it works fine but whenever I try to perform
Add,Delete,Update operations I get HTTP error
Plz help me to solve this Problem
Thanks in Advance
Munawer
---------------------------------
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
[Non-text portions of this message have been removed]
Hi Friends,
Could any one please suggest the solution
to invoke command prompt within a windows
application(vb.net application). We need to send some
values to the command prompt from the windows
application and have to receive the values, which were
entered by the user, from the command prompt
back(into) to the windows application.
Awaiting for your help.
Thanking you,
Your's Friendly,
Sruthi.
#####################################################
__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com
Hi Friends,
Could any one please suggest the solution
to invoke command prompt within a windows
application(vb.net application). We need to send some
values to the command prompt from the windows
application and have to receive the values, which were
entered by the user, from the command prompt
back(into) to the windows application.
Awaiting for your help.
Thanking you,
Your's Friendly,
Sruthi.
#####################################################
#####################################################
__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com
Hi Ajit,
> I want to store the end time of the user. I have
> implemented this with exit button. On the click
> event of button, a logout.asp file is called and
> end time will be stored. But when the user closes
> the window with Alt+F4 or Ctrl+Alt+del it is not
> working. Please give me some suggestion.
Don't rely on the Session_Close event. Rather, if you know what your
timeout is, just set the 'logout' for the session as an explicit time
as a difference between their last 'event' (this click) and now:
dLogout = dateadd("n", session.timeout, now)
Regards,
Shawn K. Hall
http://ReliableAnswers.com/
'// ========================================================
You don't have to get it right the first time.
-- Barbara Sher
Hi,
I want to store the end time of the user. I have implemented this
with exit button. On the click event of button, a logout.asp file is
called and end time will be stored. But when the user closes the
window with Alt+F4 or Ctrl+Alt+del it is not working. Please give me
some suggestion.
Ajit
Hi Luzviminda,
> Now, my next question is I think your group is way too
> advanced for me. Any idea where I can find a good asp
> ground for a very novice like me?
Perhaps the best ASP list I have seen is another I participate with
here:
http://groups.yahoo.com/group/active-server-pages/
In that everyone from novices to experts meet and facilitate each
others needs.
It may also help if you state whether you have much experience in your
posts.
Regards,
Shawn K. Hall
http://ReliableAnswers.com/
'// ========================================================
Those who danced were thought to be quite insane by those
who could not hear the music.
-- Angela Monet
---
[This E-mail scanned for viruses by Declude Virus]
Your response is very interesting and had left me scratching my head.
That is because I have never worked with asp before. I have no knowledge with
asp.
I managed to figure out how to post the data in two different places.
I have one addmeeting.asp after clicking submit, the data is then posted to
employer/meetingschedule.asp in order for the data to be posted on a
different page is to duplicate the employer/meetingschedule.asp and named
into 'career/meetingschedule.asp'. Now, if someone entered something into the
addmeeting.asp and they hit submit it will actually post it into two the same
page with different name and location.
Now, my next question is I think your group is way too advanced for me. Any
idea where I can find a good asp ground for a very novice like me?
Thank you very much for you help.
-----Original Message-----
From: Shawn K. Hall [mailto:shawn@...]
Sent: Friday, June 13, 2003 5:03 PM
To: asp-FAQ@yahoogroups.com
Subject: RE: [asp-FAQ] method="post"
Hi L,
> can anyone help me how to post a meeting event
> to two separate pages?
> ...
> Form > addmeeting.asp
> posted > employer/meetingschedule.asp
> posted > career/meetingschedule.asp
This type of thing would be ideal for XML on the server. A form can
only post to a single location - but that location can do anything it
wants to with the data. For example, post to /meetingschedule.asp and
in that use the following code:
'// ========================================================
<%
Response.Buffer = True
Dim oXml1, oXml2
'[Form 1]
' post the data
Set oXml1 = Server.CreateObject("Microsoft.XMLHTTP")
oXml1.Open "POST", "/employer/meetingschedule.asp", False
oXml1.Send Request.Form()
' return
Response.Write oXml1.responseText
Set oXml1 = Nothing
'[Form 2]
' post the data
Set oXml2 = Server.CreateObject("Microsoft.XMLHTTP")
oXml2.Open "POST", "/career/meetingschedule.asp", False
oXml2.Send Request.Form()
' return
Response.Write oXml2.responseText
Set oXml2 = Nothing
%>
'// ========================================================
This will enable you to post to two different locations from the
initial location. BUT, of course, why not just write it to do
everything from the first page in the first place, instead of
involving unreliable http traffic to hit it's own server?
Another option, assuming that you're running W2K+ and it's on the same
server & domain - use:
Server.Execute ("/page1.asp")
Server.Execute ("/page2.asp")
...to have the same effect without the round trip.
Regards,
Shawn K. Hall
http://ReliableAnswers.com/
---
[This E-mail scanned for viruses by Declude Virus]
'===========================================================
Archive : http://ReliableAnswers.com/YG/msg?asp-faq
Files : http://ReliableAnswers.com/YG/files?asp-faq
Group : http://ReliableAnswers.com/YG/group?asp-faq
Subscribe : http://ReliableAnswers.com/YG/sub?asp-faq
Unsubscribe : http://ReliableAnswers.com/YG/unsub?asp-faq
Attachments : Not Permitted
'===========================================================
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Hi L,
> can anyone help me how to post a meeting event
> to two separate pages?
> ...
> Form > addmeeting.asp
> posted > employer/meetingschedule.asp
> posted > career/meetingschedule.asp
This type of thing would be ideal for XML on the server. A form can
only post to a single location - but that location can do anything it
wants to with the data. For example, post to /meetingschedule.asp and
in that use the following code:
'// ========================================================
<%
Response.Buffer = True
Dim oXml1, oXml2
'[Form 1]
' post the data
Set oXml1 = Server.CreateObject("Microsoft.XMLHTTP")
oXml1.Open "POST", "/employer/meetingschedule.asp", False
oXml1.Send Request.Form()
' return
Response.Write oXml1.responseText
Set oXml1 = Nothing
'[Form 2]
' post the data
Set oXml2 = Server.CreateObject("Microsoft.XMLHTTP")
oXml2.Open "POST", "/career/meetingschedule.asp", False
oXml2.Send Request.Form()
' return
Response.Write oXml2.responseText
Set oXml2 = Nothing
%>
'// ========================================================
This will enable you to post to two different locations from the
initial location. BUT, of course, why not just write it to do
everything from the first page in the first place, instead of
involving unreliable http traffic to hit it's own server?
Another option, assuming that you're running W2K+ and it's on the same
server & domain - use:
Server.Execute ("/page1.asp")
Server.Execute ("/page2.asp")
...to have the same effect without the round trip.
Regards,
Shawn K. Hall
http://ReliableAnswers.com/
---
[This E-mail scanned for viruses by Declude Virus]
can anyone help me how to post a meeting event to two separate pages?
I have a page wheren you can add an event.
when clicking the submit button the page is then posted to two
different pages.
Form > addmeeting.asp
posted > employer/meetingschedule.asp
posted > career/meetingschedule.asp
All,
I have just started developing a new web site using ASP.
The question is:
How to maintain the users information using Session variables after
he has logged in?
I know the simplest (and I guess the most vulnerable way) to store
in the information in 2 session variables:
Session("Login")
Session("Password")
Someone has already mentioned and even I think this is not a good way.
I want to know the best way to do it. Please provide the code if you
can to create the session variables for the user after he enters his
login and password and we verify it in the database + code that goes
in the other pages as he browses through the web site.
I will really appreciate your help.
Thanks,
Kunal Parekh.
I have a mySQL db setup, which can be connected to through IIS
(testing the data source through a DSN). I can also connect to the
db through SQLyog (GUI interface for the mySQL db).
However, I cannot connect to the db via an ASP page. I've tried
numerous connection strings, along with trying to connect with a DSN -
all unsuccessfully.
The ASP pages reside on a Win2k box and the db is on a linux box.
The fact that I can connect to it shows that I *should* be able to
hit the db from within the ASP page. Any help would be appreciated.
Some connect strings I'm trying...
'this is the simplest way to make the connection and it *should* work
rather easily 'adoConn.Open "DSN=employees.frm.dsn"
' from damian
'adoConn.Open "driver={mysql};
database=company_phone_listing;server=192.168.1.3;uid=hr;pwd=hr;option
=1
6386;"
' oledb provider for mySQL
'adoConn.Open "Provider=MySQLProv;" & _
' "Data Source=company_phone_listing;" & _
' "User Id=hr;" & _
' "Password=hr"
' from able consulting
'adoConn.Open "Driver={mySQL};" & _
' "Server=192.168.1.3;" & _
' "Port=3306;" & _
' "Option=131072;" & _
' "Stmt=;" & _
' "Database=company_phone_listing;" & _
' "Uid=hr;" & _
' "Pwd=hr"
' from connectionstrings.com
'adoConn.Open "Driver=
{mySQL};Server=192.168.1.3;Port=3306;Option=131072;Stmt=;Databas
e=company_phone_listing;Uid=hr;Pwd=hr;"
Hi all,
if anyone can help with this it would be a appreciated..
i have built a generic system that uploads information
from excel spreadsheets using ODBC and ASP.
for the first excel sheet i used, everything worked fine,
uploaded the data, happy.
the next sheet i used had a lot more columns, (about 78)
and I get the following error when I try and read it:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Excel Driver] The field is too small to accept the
amount of data you attempted to add. Try inserting or pasting less
data.
/metacalc/default.asp, line 364
HERE is the code:
Set ExcelRecordSet = Server.CreateObject("ADODB.Recordset")
ExcelRecordSet.ActiveConnection = ExcelConn
ExcelRecordSet.CursorType = 3 'Static
cursor.
ExcelRecordSet.LockType = 2 'Pessimistic
Lock.
ExcelRecordSet.Source = "Select * from calculator"
ExcelRecordSet.Open
364 ExcelRecordSet.MoveNext
so you can see that the error is on the MoveNext, so it has opened it
successfully, but can't move thru the rows..
If I delete rows from the spreadsheet it works ok..
I have tried to find out why there is this limitation in ODBC
or whether its my fault.
Is there some way to increase the size that it can handle?
any help would be most appreciated..
thanks,
steve
I have two copies of the same database. One for the web server the other is for
the intranet. I want when someone changes, delete, or insert a record in the
intranet, the database in the web server update autmaticly. How can i do that?
Is they any software or some sort of programming?
--- In asp-FAQ@y..., "FAHAD" <hadhramy@g...> wrote:
> Hi everyone!!
> Could anyone tell me usefull sites that will help me start learning
> ASP?
ASP samples(smtp, upload,xml, xslt,crypto,) available at
http://www.dalun.com/index.asp