Submitting Webpage Values To Database (ASP.NET 2.0 And Access)
Mar 8, 2007
Here is my code:PHP Code:<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim Dbconnection, sqlcommand, dbcommunication, dbread
Dbconnection = New Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & Server.MapPath("LAM.mdb"))
Dbconnection.Open()
sqlcommand = "INSERT INTO Customers([CustomerID],[LastName],[FirstName],[Title],[BirthDate],[Address],[Town],[County],[PostCode],[HomePhone]) values ('" & CustomerID.Text & "', '" & LastName.Text & "', '" & FirstName.Text & "','" & Title.Text & "', '" & BirthDate.Text & "', '" & Address.Text & "', '" & Town.Text & "', '" & County.Text & "', '" & PostCode.Text & "', '" & HomePhone.Text & "')"
dbcommunication = New Data.OleDb.OleDbCommand(sqlcommand, Dbconnection)
dbread = dbcommunication.ExecuteReader()
dbread.Close()
Dbconnection.Close()
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="CustomerID" runat="server"></asp:TextBox><br />
<asp:TextBox ID="LastName" runat="server"></asp:TextBox><br />
<asp:TextBox ID="FirstName" runat="server"></asp:TextBox><br />
<asp:TextBox ID="Title" runat="server"></asp:TextBox><br />
<asp:TextBox ID="BirthDate" runat="server"></asp:TextBox><br />
<asp:TextBox ID="Address" runat="server"></asp:TextBox><br />
<asp:TextBox ID="Town" runat="server"></asp:TextBox><br />
<asp:TextBox ID="County" runat="server"></asp:TextBox><br />
<asp:TextBox ID="PostCode" runat="server"></asp:TextBox><br />
<asp:TextBox ID="HomePhone" runat="server"></asp:TextBox><br />
<br />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /> </div>
</form>
</body>
</html>
It says the problem is with: PHP Code: dbread = dbcommunication.ExecuteReader()
Can I get some advice on this please,
Jane
View Replies
ADVERTISEMENT
Aug 22, 2014
How do I make quotes and invoices submittable with no product and service details? We use sale book tags and have a few tags that are voided. I want to keep them in our records as voided. I've create new quotes for these tags, labelled them as void through products and services, but I can not submit the quote. I think I can not submit the quotes because there is no Total Price amount. How do I submit quotes and then invoices for my records with no Total Price amounts?
View 2 Replies
View Related
Jan 4, 2006
I've been attempting to link a ms access database to our company's website, but now each time I try to view the page I recieve the following message:
" HTTP Error 403
403.1 Forbidden: Execute Access Forbidden
This error can be caused if you try to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed.
Please contact the Web server's administrator if the problem persists. "
...rude.
Here is the code...
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<!--#include virtual="/Connections/TRIAL2.asp" -->
<%
var Trial2 = Server.CreateObject("ADODB.Recordset");
Trial2.ActiveConnection = MM_TRIAL2_STRING;
Trial2.Source = "SELECT * FROM [website update] ORDER BY Price ASC";
Trial2.CursorType = 0;
Trial2.CursorLocation = 2;
Trial2.LockType = 1;
Trial2.Open();
var Trial2_numRows = 0;
%>
<%
var Repeat1__numRows = -1;
var Repeat1__index = 0;
Trial2_numRows += Repeat1__numRows;
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style6 {font-size: 12px; font-family: arial;}
-->
</style>
</head>
<body>
<table width="82%" border="1" cellspacing="0" cellpadding="0" summary="List of property details">
<tr>
<th width="22%" scope="col"><span class="style6"> Code </span></th>
<th width="18%" scope="col"><span class="style6">Address</span></th>
<th width="28%" scope="col"><span class="style6">Suburb</span></th>
<th width="17%" scope="col"><span class="style6">Price</span></th>
<th width="15%" scope="col"><span class="style6">Title</span></th>
</tr>
<% while ((Repeat1__numRows-- != 0) && (!Trial2.EOF)) { %>
<tr>
<td><%=(Trial2.Fields.Item("Property Code").Value)%></td>
<td><%=(Trial2.Fields.Item("Address").Value)%></td>
<td><%=(Trial2.Fields.Item("Suburb").Value)%></td>
<td><%=(Trial2.Fields.Item("Price").Value)%></td>
<td><%=(Trial2.Fields.Item("Title").Value)%></td>
</tr>
<%
Repeat1__index++;
Trial2.MoveNext();
}
%>
</table>
</body>
</html>
<%
Trial2.Close();
%>
I can't find any info on this error through google, so i'm not sure what step to take next. Any advice would be great, I'm willing to try out other databases (obviously retyping the data would be a pain in the arm but if it works its worth it)
Cheers:p
View 1 Replies
View Related
Dec 15, 2005
Right, I knew this day would arrive and have somewhat been dreading it but excited by the idea of a new development at the same time.
We have a database within the school on our server that staff would like to be able to access at home through the internet. They will need to be able to view, add and edit data. What is my best way of doing this for someone who has never done this before?
Is it possible just to put a link on a website? or do I have to covert?
Is the MSAcces dataaccess pages something i should look at? Should I use VB.NET? ASP.NET?Frontpage? Everyone seems to have a different take on this from the forum but most of the advice was quite old. So what do you all think out there?
And How can I learn really really fast? Any online tutorials or Books people can suggest would be ever so helpful as well.
Thanks alot in advance for any support you are able to give me with regards my best route of action.
View 14 Replies
View Related
May 7, 2013
In addition to my Intro to Access class, I am taking a Web Programming class, which has the same general assignment, but for Web pages, instead of an Access database; create at least 3 pages, 1 each for financial data, customer relations and product/service info.
I would like to create a small Access database connected to a Web page. I won't have a server, but I can run everything off a computer. I have a book that tells me the steps to do all this, but I'm supposed to install MS SQL Server (I chose to download MS SQL Express Server), and I can't get Access to talk to it. Among other things, I noticed that I could not stop SQL Server, nor could I start SQL Browser. I did enable TCP/IP (I think). I uninstalled the whole thing, thinking I could start from scratch.
How to publish my database on a Web page.
View 3 Replies
View Related
Mar 19, 2013
I'm using "Application.FollowHyperlink" to send parameters to a remote application.
Each time i hit the enter button an 'After Update' event opens a web page.But i don't want the web page to be opened.
is there another method to send parameters over the web without opening a web page?
View 2 Replies
View Related
Nov 27, 2012
I have written a html page that posts a form to a .asp page, which in turn is supposed to write data to a MS Access database. Problem is while my html page works, and my .asp page seems to work fine as well, nothing is being saved to my database!
I'm not sure if its something wrong in my .asp page...
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<% Option Explicit %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
[code]....
or if you think there may be some configuration in my database I'm missing. Just an FYI all the database table columns take empty values.
View 1 Replies
View Related
Oct 14, 2004
Hi all...
I'm developing a Flash survey, at the end of which the user will submit the answers to all the questions to an Access Database. Aswell as the answers I'm also capturing some personal details. This I can do, no worries! However, the client now wants the survey to be customisable, meaning that the number of questions will vary.
I'm looking for some advise from anyone that might have done something similar. Should I submit all the answers bit into one field in the DB (as a comma delimited variable)? Is it possible to then extract that one value and separte the values out again? Would anyone have any tutorials that might have used? Any help gratefully appreciated.... TIA,
dpchages
View 10 Replies
View Related
Oct 9, 2013
I am writing a macro to automate the filling up some data from excel to company website. I have changed the website name in this post for data protection purpose. The excel will login for different clients by using the combination of username and password for respective clients and then some data are required to be inserted in a text box on a web page, I think the text box is on a form and form is within an iframe, within the web page. Once the data is inserted into text box, one button (Submit), which is also on the same form, is to be clicked.
On the click of a button, the updated data appears on another section, I could not make out if it is an form or frame, which is under the abovementioned form. Once we are happy with the way data appears on the web page, we have to click another button (Update), which is on the same section, to finally updating the data on website.
I wrote the following code to login to the website and then to navigate to the web page where I have to fill up the performance numbers in a text box. The first problem is how to access the text box inside the form from VBA so that the macro can write a number in that text box and how to access the button to submit the data. The HTML code, which can be seen on click of F12, is attached below. The second problem is how to access the Update button inside the other section, so that the data will be finally uploaded.
Code:
Sub LoginToCorpAccount()
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
[code]...
<div id="ssc-consumers-holder"/> -
This the line which gets highlighted when I click on the section where the data appears after clicking the submit button, and from here Update button is to be clicked.
View 4 Replies
View Related
Feb 4, 2014
I am trying to extract some values from a PDF (attached) and write them to an Access database. I am unsure of the approach, especially extracting values from the file.
View 2 Replies
View Related
Nov 3, 2006
Hi,
Is there a good developer tool for turning an access db into a webpage?
Or should I go about it in a completely different way?
I want it to work just as it does, but I would like to have it on the www.
Fuga.
View 11 Replies
View Related
Aug 23, 2004
I am just checking to see if anyone knows of a way (or a plugin download) that will allow me to create some sort of box that has a pre-specified website in it. It would be something like www.usps.gov, because sometimes our reps need to look something up, and it would be nice to have it right there. But the website that they will use has a login/password. So i will need some sort of "reset" button that will take them back to the main page in case it times out. Anyone know of anything?
View 5 Replies
View Related
Dec 6, 2005
Hi,
I've currently got apache/asp up and running, I'm just wondering how I display an access database, or if there is any tutorials about to do this.
I should point out here, that ASP is an entirely new language to me, and I really haven't got a clue how to write in it, I do have a solid programming with software and such.
What I'm trying to avoid is, some kind of prefab made by "access" itself display, as the data in the database has to be displayed in a certain way.
If anyone could give me some advice on where to start on this adventure, I'd be glad to hear your comments and sudjestions, as I'm currently
View 2 Replies
View Related
May 24, 2005
I wasn't sure where I should have posted this question so please feel free to move it if necessary.
I am not even sure this is possible and I didn't know where to begin but these forums have always been extremely helpful.
What I would like to do is export data directly from Access (via form, table or query) and populate it directly to an existing, external webpage.
A little background. My company orders cars an for certain manufacturers, Toyota for example, we order via a secure website. All of the other manufacturers have their order directly transmitted to them. The orders for Toyota take 3-4 times longer to place and I was hoping to speed the process by exporting existing order information directly to the webpage.
Please let me know if it seems like I am smoking something and I will gladly step away from the pipe....=)
Thanks in advance,
Brian
View 4 Replies
View Related
Jul 25, 2006
I am trying to put my form on the internet so that many users can access the form, that way I can keep one copy of the database and have everyone simply use the webform to edit it. I have converted my forms into webpages and all seems fine except my subforms dont show. Also, my comboboxes become text boxes. How can I stop this from happening? Once I have everything in order, how would I go about putting the forms on the internet for use? Is it possible to password protect the form, so only certain people can use it?
Any help would be GREATLY appreciated.
Thanks,
JetBlack
View 2 Replies
View Related
Jan 7, 2014
MS Access 2000 - Quite simply, on a form I have an Email field and I have the "Is Hyperlink" property set to yes. In the On-Click event of this email field I use this single line of code below to open a new outlook (2007) email with the address already entered. Staff will be entering the email address themselves as part of the clients contact details Form.
Code:
FollowHyperlink "mailto: " & [Email]
This is all fine, however access also tracks [URL] .... onto the end of the email address and tries to also open a web page which obviously fails.
Is there something somewhere I can tweak that tells access to always only treat the text in this field as an email address, and when clicked open an email?
View 6 Replies
View Related
Feb 26, 2013
How would I setup a hyperlink to a web page, from Access?
View 1 Replies
View Related
Jun 7, 2014
I try to open a web page with a form in access 2007. During the loading of the page it shows me 2 security error messages.
I tried to change the properties in Activex and especially the Silent property from No to Yes but this is not possible. In the next restart of the form restores the original settings.
When i open the same page with Internet Explorer it doesn't show any error. I have attached the database example to see exactly what happening.
View 9 Replies
View Related
Dec 31, 2013
I am using Access 2007 to update a page on an external website (amongst other things) from an Access form using VBA, but that page has recently changed. I have dealt with most of the issues around this, but there is still a problem that I cannot see how to resolve. Previously all the fields on the page were uniquely named, and so I was able to assign values from my form to them using
Code:
.document.all.item(fieldname).value=...
But now there appear to be identically named fields on the webpage and I cannot see how to differentiate between them in my code. I have attached a text file with the two relevant sections, containing the HTML for the two relevant sections on that page only (the code for the whole page runs to 8000+ lines and I can add the lot if really necessary) and as you will see the names for things like runs (name="result[][runs]") and wickets ("result[][wickets]") are the same in both sections. So how do I tell one from the other in my code?
Currently I have the following:
With objIE
.Visible = True
....
'1st innings - new HTML field names but duplicated on the webpage
.Document.all.Item("result[][runs]").value = nz(Me![runs_for#])
.Document.all.Item("result[][wickets]").value = nz(Me![wickets_for#])
[Code] .....
How can I differentiate between the HTML field names in the attached file as simply as possible in my code above?
View 2 Replies
View Related
Jan 17, 2014
I am trying to create a button that opens up a webpage. I get how to create a hyperlink on a button. The problem is, I need to open a specific page depending on the information in a text box.
The text box displays the tracking number for the current record. That number is populated automatically via a control source. The problem is that I need to open different web pages depending on the tracking number displayed. For example, UPS has a specific start to their number (1ZX....). Other trucking companies have a specific format, also.
So how do I tell it to look at the tracking number and then open the corresponding web page?
View 2 Replies
View Related
Mar 12, 2014
In my DB I have a query that I need to create a static webpage from, now in excel I can do the record button and bingo, but access is a lot more confusing.
I have a template named doc_tplt.html that when I do the export from the query it creates the webpage using this template.
I want to have a form with a selection of command buttons on it to export to html using the template for various queries and tables.
What is the VBA code to export the query (qry_docs) and apply the template (doc_tplt.html) and save to the same directory as the DB itself.
View 2 Replies
View Related
Dec 13, 2004
In one form i have a field called "address" and if the address changes I want to - by clicking a command button or such - automatically transfer this field into a field called "previous address" on another form. How can I do this??
View 3 Replies
View Related
May 20, 2005
Hi
I have an access database, with around 36000 records. In one table, I need to add something to the values already in the field. Like:
Value in field:
image1.gif
image2.jpg
and so on
I need to change this value to:
images/image1.gif
images/image2.jpg
and so on for all the records.
There are 3 fields like this, each with around 30000 records.
Is there an easy way to do this? Other than copy the images ?
Thanks
View 2 Replies
View Related
Oct 16, 2007
Hi all,
can i use a listbox control NOT IN A PROGRAMATICALY way, in a table to allow user choose one of some pre_defined values (for example 1,2,4). This field will be used as a parameter in an communication with HW, that's why its crucial not to let users choose whatever value that they want.
Thank you
View 3 Replies
View Related
Dec 13, 2007
I've been racking my brain the last couple of days trying to figure out how to solve this problem, and I believe I've reached the end of my rope. I have a feeling that this isn't very difficult to a more savvy Access person, but I am at a loss.
Here's the situation. I have received a fairly large DB containing CCTV data for sanitary sewers. There are primarily two tables I'm dealing with, one lists a number (auto-number) for each pipe that was televised. Simple enough. The other uses this legacy number to show all deformities or service leads within a particular length of pipe. For example, for run X, there may be 7 rows in the table with X as the ID, one for each service lead along that length of pipe (I hope this is making sense :()
Ultimately, we need to tie this database into our GIS theme. To do this, I will need to add to the PipeID number from our GIS theme to the access table. What I've done so far is to create a new table in the DB with the number for each pipe televised, and I've manually added the corresponding PipeID number from the GIS in the second column. What I'm hoping to do is add a new column to my occurrence table so that for each occurrence X, I can add the GIS PipeID number. Perhaps this would make more sense:
Run # PipeID
1 S143
1 S143
1 S143
1 S143
2 S231
2 S231
2 S231
2 S231
3 S543
3 S543
3 S543
I've gone ahead and created the relationship between the newly created table and the existing table based on that auto-number field, and I've made the new PipeID column a combo box. This shows all of my PipeID numbers, which is a good thing. I'm hoping there's a way for it to automatically recognize the auto-number field and populate the PipeID field accordingly.
Have you ever known what you want to say, but not quite understood how to say it? That's kind of how I feel about this question, and I do apologize if I've made no sense. But if I have, and anyone has any suggestions for me, they would be greatly appreciated.
Cheers,
Azimuth
View 3 Replies
View Related
Jun 25, 2013
I'd like to create a combo-box in a database which takes its values from a field in a table in another db. Both of the dbs are on my computer.
How can I do that?
View 6 Replies
View Related