Create Database And Create Table On One Form
Here's what my code looks like...
View RepliesHere's what my code looks like...
View RepliesI have an asp page that gives results for a search from a previous page from streetguide.streets in MySql. The page displays the UserName of the person logged in.
I have the results of this query displayed inside a form with hidden variables. When the user clicks "save to my folder" I want it to create a table in the mysql db with the same name as the user name, and then write to this table.
I have it working if I created the table beforehand, but I want the table to be created dynamically upon form submission with the table name to match the persons user name.
I know I can Create Tables In a database with the CREATE TABLE sql statment, but I don't exactly know the syntax of the statment.
I want to add a table with a sertin feild that has a default value, is that possible?
The syntax I know is:
sql = "CREATE TABLE tablename(feildname FEILDTYPE,feildname FEILDTYPE...)"
Are there any other parameters that I can add to the statment?
I'm writing an ASP app to create a table in an MS Access database. I use:
Code:
sql = "CREATE TABLE success(name text (50), company text (75), article memo (), img text (50))"
and get a syntax error. When I remove the "article" field and param, it works. Even when I add a max char param inside the parenthesis
Code:
article memo (255),
I get the same error. Doesn't the "memo" data type allow unlimited charactors? If so, is there a param that I need to add to the memo () call?
how to tell access to allow a zero length and put a default value now() in the date/time field in SQL?
View Replies View Relatedhow to create new table which the table's name is variable. for example: i want to create table with the name is come from user's input in the form input.
create table <table's name variable> ( ...
Can you create a table in an access database using create_table?
View Replies View RelatedCode:
<%
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.MapPath("mydb.mdb"))
'conn.Open "DSN=Survey"
Dim strSQL
' Creates a table called survey3
strSQL = "CREATE TABLE survey3 (Q1 text(20),Q2 text(20));"
conn.Execute strSQL
%>
This code works..But before I create the table I need to check if it exists and only if it doesn't i want to create it...How can i do it?
I need to create a new table in an Access Db for a Db driven Classic ASP website. My concern is that if I alter my local copy of the Db and then simply upload it, data might be lost if any of the users are logged in and posting stats.
Is there a way for me to write and execute some code to add to the Db? In PHP I usually use sql statements with the PHP MyAdmin interface, but I don't know of such a thing for ASP-does it exist?
I am having a problem using the SQL statement "CREATE TABLE" for an SQL Server database. The code works right in Access but when it did not work in SQL Server 7, I changed some of the datatypes to match an SQL Server 7 generated script. The problem is, it still does not work!
Now the first comments will probably be something like, "make sure your SQL user has permission," or, "make sure your connection string is correct." I have already tested that - the connection string works and I used the DBO (sa) user. Code:
I am trying to use asp to create a new table in an existing database and I keep getting this error:
Microsoft JET Database Engine error '80040e14'
Syntax error in CREATE TABLE statement.
/install.asp, line 75
What would cause this?
Here is the code I am using:
Code:
cnn.Execute("CREATE TABLE crosssale (prodID "&txtcl&"(50) NOT NULL,related "&txtcl&"(50) NOT NULL, PRIMARY KEY(prodID,related)")
By the way txtcl equals:
txtcl = "TEXT" 'access
or
txtcl = "NVARCHAR" 'sql
In the same way that you can create and alter permanent tables in Access 2000 using SQL in ASP ( CREATE TABLE <tablename> col_1(col_1 datatype), col_2(col_2 datatype....Col_n(col_n datatype)) is there any way to do this for Queries?
View Replies View Relatedhow do you create a table in MS Access from with an asp script? I will be creating the table name from Request.querystring("name"), also needs fields of branchname and branchcode. guess something like CREATE TABLE & Request.querystring("name") branchname. branchcode.
View Replies View Relatedhow do i create a td for each field in my rs, with out labeling them. this is what i have, not sure if i'm heading in the right direction or not.
Code:
<table>
<tr>
<%Do while not rs.eof%>
<td>
<%= rs ('insert rs name'<<<<???)%>
</td>
<%rs.movenext
loop%>
</tr>
</table>
I have MS SQL Server as database. i want to create a new table in the DATABASE, through asp script, naming table's name and naming the fields with their data types.
Can i do this through an asp script, like it can be done through Database tools like Enterprise Manager??
How can I loop through the values of one MSACCESS table to display the related records from another table? I have one table with two single field records. The values are 4 and 9. These fields are related to another table which contains records that belong to either 4 or 9.
I want my web page to display a table for all records belonging to 4 and then another table of all records that belong to 9. I could specify either 4 or 9 in different record collections but the 4 and 9 could one day be 1 and 5 and I don't want someone to have to get into my code to change the 4 and 9 to 1 and 5 in my sql queries. Any advice?
I need to do a simple but complex thing...
For every record is my users table, I need it to creating a record in 3 tables, with one value (all the same)...
So, in detail:
1 users table
Need to create a record in 3 other tables with the userid from the record it added...
e.g.
From record 1 in Table A, create a record in Table B, C, and D with the value of field 'userid' the value of the 'userid' field from Table A...
Get it?
I'm trying to dynamicly create a table in an existing ACCESS database. Code:
View Replies View RelatedI have been looking everywhere, and can't find a complete function to create tables and columns in access .mdb from ASP, while adding columns that are missing in tables that already exist, can anyone post a link or the code to such function?
View Replies View RelatedI am in the process of rewriting my table formats for an Access Project that was created. I now need to get the data from 1 table and transfer to a second table.
I created a page that creates the record set, I then loop through that record set and need to run an update statement to a second table, however, I get the following message:
Microsoft JET Database Engine (0x80004005)
Could not use ''; file already in use.
/BusPlanTest/updBusPlan.asp, line 17
Below is the code I am using: Code:
i have been asked by a friend to create a form in asp,basically one that gets 2 numbers and adds them to gether,then puts the result on the same page.
how this is done as i havent got a clue.i know how to make a basic form.
is it possible to create a database on the server side on the fly. i know creating tables is not a problem sql. but creating a database on the fly im not sure. what are my options?
View Replies View RelatedHow i create a new sql database, i need to use some program to do that ? I never work with SQL, i always use ACCESS, sql is like access?
View Replies View Relatedhow can I create a MDB Database on the ASP server. With the FSO I have some Problems because the Browser tells me that the file with the same name is on the server but there is no file.
View Replies View Relatedhow can i Creat new table in mdb database. Does exist any command to do that?
View Replies View RelatedI have been tasked with developing an online Purchase requisition system for my employers. This requisition system will submit the employees requisitions to a database for approval before they can buy their required products.
What I would like to do is offer the option of creating a word doc or pdf of the requisition details on submission to the database. This doc or pdf could then be emailed or printed and sent to a supplier for a quotation.
Is it possible to have a form do 2 functions at once? i.e. submit data to the database as well as creating this doc or pdf? Any info on how to create a doc or pdf from an asp form would be much appreciated.
I have a problem to create a reservation form. Code:
View Replies View Relatedi have an access database and i want to create a form using asp to search one or more field(s) and display all the fields in the db online.
you know where i can get help on this or is there such a software where i could buy and do this kind of stuff?
I've made a website for a little athletics club in HTML. I want to transform the records page into an ASP page that has an admin page so i can go to the admin page and easily add in the records without having to create all the tables and doing it all the manual way.
I know how to create the admin page and the database, but in my case, i want to be able to create a new table in the database for each week of records (as seen in the link below), and each of these tables will have the same fields (age, gender, event, athlete name etc.) I know how to make it so that asp can add, edit and delete a field in a table, but how would i get it to add a new table for each week of records?
I want to check if this database is exist so I avoid the error that appears when I try to create it another time and also I want to know how to delete this database.
View Replies View RelatedHow can I create a database access using asp+javascript withen the code?Is there (createdatabase)?If yes how can we use it?
View Replies View Relatedi would like to create the following one, but nor I know as. One index.asp that db catches one information as heading, hour of entrance and station time and shows in the page index. An example, let us assume that now they are 23:00, then the shown information will be inserted in the page index.asp in accordance with the current hour.
If it will have something registered in cadastre in db that it starts the 23:00 and it finishes the 01:00 will be in index, passing the hour it leaves and it enters another message with programmed hour.
If I have in db a message that would have to be shown of the 09:00 the 11:30, and now I am 11:20, the system analyze and show the information, until he is 11:31, when then I enter another one, and thus successively, they are menmsagens that in accordance with enter the hour of the server.
I am trying to create a upload file form in asp.here is what I have so far
Code:
<form enctype="multipart/form-data" name="Form1" action="<%=basepath%>Admin/reportrequest.asp" method="Post" onSubmit="return submitwindow(Form1)">
and then I have the following
<TD>
Upload the templated :
</TD>
do I need to do two separte forms,because when I include enctype="multipart/form-data" in my form then my submit part stops working meaning it will not add data in my sql table when I hit submit.