I 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?
What I want to do is list all of the columns in a table from a MYSQL database.. How would i go about this? I already know about select *, what I want to do is write them all down.
I'm sure it sounds kinda nutty to display 200 columns and 500,000 rows of data. But I have been pulling data from a Lotus Notes database into Sql Server for a while now, but Lotus Notes is starting to crack, columns getting corrupted. Can't handle the volume of data and number of columns. Sql Server has no problem. But displaying the data is the big deal. The end users want to be able to scroll acros a page to the colum of their choice, or be able to scroll up or down.
I was thinking of breaking up the table into section, but this would reqire additional clicking to get to the next section of the table. Would it be feasable to have a 200 column table in asp? or should I stick with the section idea? I have to tell my dept something. They started out with Lotus Notes but couldn't query the data. I have been suggesting to migrate the project entirely to Sql Server/IIS. Notes can at least display all the columns.
i am just trying to build a table that will put content into 2 columns. Ideally, if there were 20 hits, 1-10 would be in column 1 and then 11-20 would appear in column 2...i just can't seem to figure it out. I had started by getting a recordcount, and dividing it by 2, but things got a little fuzzy after that.
Set rsSchema = objConn.OpenSchema(adSchemaTables) Do Until rsSchema.EOF If rsSchema.Fields("TABLE_TYPE") = "TABLE" Then Response.Write rsSchema.Fields("TABLE_NAME") & "<br />" End If rsSchema.MoveNext Loop rsSchema.Close set rsSchema = Nothing
just a simple example of what i'm trying to do. its supposed to list the names of all the tables in the database, but instead its returning the following error:
ADODB.Connection error '800a0cb3'
Object or provider is not capable of performing requested operation.
how 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.
<% 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?
how 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.
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??
I'm not sure if I'm posting this question to the right place? I'm a complete ASP novice, but need to learn quickly. I need to create a function to pass a variable. I basically need to create a unique id using a date format along the lines of yyyy/mm/dd/hh/mm/ss & a random number. There's probably a better way, but this is what I've been told to use.
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 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
I have a page that lists categories on the left, and I'd like to be able to click on one, and have a node pop out, revealing subcategories so users can navigate to them that way. How does one create a node function in ASP pages?
I 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 have a machine ftp-ing a file into a directory where a script picks it up and does something to it. I dont want the script to process the file if the file is still being copied.the only way I can figure out to do this is to check the size of the file... then wait 'n second and check the size again. and if the size is exactly the same... then asume its all there. but this doesn't seem like the right way to do it. is there no easy way or simple property I can check to see if its done?
I've got a variable that can hold one or more words called strUserName. I want to display the complete value of that variable in a form field but I only get the first word
How can I retrieve the complete URL of the current page? (by using ASP, not Javascript!)
What I mean is this - I have a long URL something like: https://www.zzzzzz.com:8080/zzzz/zzz.asp?aaa=1&bbb=2#a1
I know I can read parts of URL through server variables, such as PATH_INFO, QUERY_STRING etc. and then concate the string variable, but that is not enough! I need to request the COMPLETE URL like I mentioned in the example.
I need a function that would retain a value like 112.50 as opposed to 112.5. It is needed for currency values and display. I tried using cSng, cCur, but they all seem to trunicate the zero.