Click here to Skip to main content
Click here to Skip to main content

Universal Table Editor

By , 11 May 2003
 

In this article:

 

1 Overview

Universal Table Editor is an ASP application to view and edit data in any database you can reach via ADO from your IIS. Compatible databases are e.g. MS Access™, MS SQL Server™ or Oracle™. UTE is also able to export the data of a table into comma delimited text files (.CSV) which are readable e.g. by MS Excel™.

UTE is a set of files representing just one single VBScript class clsUTE which can be used in simple ASP pages or the most complex environments. Everything UTE uses is encapsulated within the clsUTE class so there shouldn't be any namespace problems at all. UTE defines all variables correctly so it is option explicit proof. The layout of UTE is completely style sheet driven so it is quite simple adjustable to any layout.

Former UTE versions (<= 1.4) used session variables quite extensively. This is history now! UTE uses no session variables any more. UTE includes an .inc file defining all language dependant settings and strings. It already comes with a number of pre-defined language files (English, German, French, Italian, Spanish) but it is not much of a problem for you to extend this list by your own.

 

2 Features

  • Insert, edit and delete records in a table.
  • Define any number of filters to shorten the number of records.
  • Export complete table content as .CSV file.
  • Show the exact field definitions.
  • Sorting of each column.
  • Automatic primary key detection.
  • Display the currently used SQL statement to read the datas from the Database.
  • UTE is one VBScript class with some few easy to use public properties and functions.
  • In action UTE is controlled via URL parameters.
  • The layout is completely style sheet driven.
  • All displayed strings are defined in a special language include file.
  • Error management.
  • UTE is option explicit proof.
  • Binary Data types will not be displayed and are not editable.

 

3 Details

3.1 How to install UTE

To install UTE you just have to copy all files from the ZIP (including sub directories) to a IIS virtual directory (e.g. ute30). That's all. Launch the index.html page to edit the included demo database.

UTE uses ADO (ActiveX Data Objects - installed on the Server) to access the database. I recommend the Microsoft ADO Pages to get more information on this technology. I have tested UTE with many databases based upon MS Access™, MS SQL Server™ and Oracle™. If you run into any trouble after installing UTE you should check for the latest MDAC (Microsoft Data Access Components) version and database providers which are available here.

 

3.2 How to use UTE

3.2.1 List Tables within Database

By calling the ute.asp page without any URL parameters or using the above toolbar button UTE will list all tables within the current database. By clicking on them, the table editor will open for this table.

http://localhost/ute30/ute.asp


click to enlarge

 

3.2.2 View Table

To open UTE with a specific table you only need to set the name URL parameter to define the name of the table:

http://localhost/ute30/ute.asp?name=OrderDetails


click to enlarge

UTE comes with a small demo database being taken from the Microsoft Northwind demo. If you want to connect to another database you need to modify the ute.asp file (see chapter 4 UTE Reference).

By using the Pages links you can navigate through the entire table. By using the Records per Page you can select the number of records being displayed on one page.

UTE tries to detect all primary key fields of the table and display them in the most left columns in italic style. This won't work in every case. There are OLEDB provider which don't return these information (whether being called directly or via ODBC). If UTE is not able to detect the primary key fields of your table, you should try another connection type (see chapter 4.3.1 Connection Types) or define them in the URL with the pkey[counter] URL parameter:

http://localhost/ute30/ute.asp?name=OrderDetails&pkey1=OrderID&pkey2=ProductID

UTE is able to sort the contents of the table by any column (field) by clicking on the header of each column. Furthermore one can specify any number of fields as URL parameters to sort the table after. To do this, use the sort[counter] URL parameter. The default sort direction is ascending. Use additionaly the sortdir[counter] URL parameter to specify another sort order:

http://localhost/ute30/ute.asp?name=OrderDetails&sort1=CustomerID&<BR>sort2=EmployeeID&sortdir2=desc

Please note that by clicking on a column header you will loose all sort parameters above "1".

UTE displays the fields of the table in the order they have been defined within the database. Earlier UTE versions sorted them alphabetically. If you want them now to be sorted alphabetically you need to set the sorted URL parameter:

http://localhost/ute30/ute.asp?name=OrderDetails&sorted=1

See chapter 4.1 URL Parameter for a reference for all URL parameters.

 

3.2.3 View Definitions

By using the above toolbar button in the table or form view UTE will display the definitions of the fields within the table.


click to enlarge

 

3.2.4 Add/Edit/Delete Data

By using the , and links in the table view it is possible to insert, edit and delete records to/in/from the table.


click to enlarge

With clicking on Ok the changes will be made permanent in the database. With clicking on Cancel it will just be returned to the table view without any changes in the database. UTE does not do any field validation but instead simply returns the error messages it receives from ADO. If the error is assignable to a special field the error message will be display directly at the field, otherwise it will be display at the top of the page.


click to enlarge

 

3.2.5 Define Filters

By using the above toolbar button you will be able to define any number of filters to reduce the amount of records within the table. Even though the dialog currently offers just 10 filters this is just a constant definition within UTE.


click to enlarge

Each filter will be taken as one WHERE clause. The filters can be connected by AND or OR. To remove filters again (and get all records form the table) just use the Clear button.

There is no direct validation of the values you enter for a filter. If you define invalid values for a filter field UTE will create an invalid SQL statement from it, get's an ODBC error and redirects back to this page and displays the original ODBC error message.


click to enlarge

 

3.2.6 Export Data

By using the above toolbar button UTE will export the content of the table into a "comma-separated" Text File (.CSV) which can be imported by other applications like e.g. MS Excel™. The file will look like:

"OrderID","ProductID","Discount","Quantity","UnitPrice"
"10248","42","0","10","9,8"
"10248","72","0","5","34,8"
"10248","11","0","12","14"
"10249","14","0","9","18,6"
"10249","51","0","40","42,4"
...

UTE will create the data on the fly and sends them to the browser. By setting setting the ContenType and an additional Header the browser will be able to start MS Excel™ if desired.

Response.Buffer = TRUE
Response.Clear
Response.ContentType = "text/csv"
Response.AddHeader "Content-Disposition", "inline;filename=" & m_sTable & ".csv"

 

3.2.7 Show SQL Statement

By using the above toolbar button UTE will display the SQL statement being used to read the data from the database as well. This might be useful when working with filters.

 

3.3 How to include UTE into your webpage

Please use the ute.asp file as a quite easy example of how to include UTE into any webpage. There is not much to do at all:

<%@ language = "VBScript" %>
<% option explicit %>
<!--#include file ="ute_definition.inc"-->
<%
  Dim sDSN
  sDSN = "Provider=Microsoft.Jet.OLEDB.4.0;" &_
         "Data Source=" & Server.MapPath("test.mdb")
  Dim ute
  Set ute = new clsUTE
  ute.Init sDSN
%>
<!doctype html public "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
  <title><%=ute.HeadLine%> - Universal Table Editor</title>
  <link rel="stylesheet" type="text/css" href="ute_style.css">
</head>
<body bgcolor="#FFFFFF" link="#0000A0" vlink="#0000A0" alink="#0000A0">
<%
  ute.Draw
  Set ute = Nothing
%>
</body>
</html>

Chapter 4 UTE Reference lists all public properties and functions the clsUte class exports and also explains how to connect to a database.

All definitions and the class itself will be included via the ute_definition.inc file. If you encounter problems e.g. with the URL parameter names UTE uses this is the place to simply give them some other names. I have written UTE as flexible as possible so you can change really a lot without need to dive in deeply into the logic. The layout is completely style sheet driven within the file ute_style.css.

 

3.4 How to use UTE in different languages

Within UTE all strings to be displayed on the screen are defined in a separate language include file: ute_language_*.inc. UTE comes already with a number of predefined languages files:

Language File
 English ute_language_en.inc
 German ute_language_de.inc
 French ute_language_fr.inc (by Evelyn Berkemeier)
 Italian ute_language_it.inc (by Marco De Sortis)
 Spanish ute_language_es.inc (by Agustin Vega)

Per default UTE uses the English file. It is the first include statement within the ute_definition.inc file. So all you have to do to change the language of UTE is to change this include statement. If you translate UTE into another language please share it with the rest of us (see chapter 6 Some final words for how to share your work) !

 

4 UTE Reference

4.1 URL Parameter

There are two kinds of UTE parameters: public and private parameters. Well, URL parameters are not really public and private, but they are meant to. The public parameters should be used by you, the private parameters shouldn't. They are created and used by UTE only.

Please note that UTE will keep ALL your own URL parameters you set additionaly when opening a page where UTE is included in.

 

4.1.1 Public URL Parameter

Name Default Description
name   Name of the table to be viewed/edited.
Note: some database might be case sensitive at this point.
pkey[counter]   If UTE is not able to detect the primary key fields of a table you should set all of them using this parameter, where [counter] is an integer counter of the field you want to define, starting with 1.
Note: some database might be case sensitive at this point.
Do not define gaps within the counting !
You will also note, that UTE will set these parameters by it's own while browsing through a table. This is to simplify the code.
sort[counter]   To ask UTE to sort the content of a table after a specific column, you can use this parameter (any number of it) to specify the sort field(s). This will result in a ORDER BY clause. The [counter] is an integer counter of the field starting with 1. By default all fields will be sorted ascending. If you want a different sort order for a field, you need to use the sortdir[counter] URL parameter.
sortdir[counter] asc By default UTE sorts all records in a sorted column ascending. To sort a field in a descending order, you need to use this URL parameter with the value desc. The [counter] is an integer counter of the field starting with 1. If you want the first and second field to be sorted ascending and the third field descending you have to the a parameter sortdir3=desc.
sorted 0 UTE displays the fields (columns) in the order as they are defined within the database (except primary key fields, which will always be displayed in the most left columns). Set this parameter to 1 if you want UTE to display the fields/columns alphabetically sorted.

 

4.1.2 Private URL Parameter

Name Default Description
page 1 Number of page being displayed
pagesize 10 Size of page in number of records.
mode 0/1 View mode of UTE.ASP page. There are three modes possible:
  • 0 - List all tables within current database.
  • 1 - Table Mode, display current table.
  • 2 - Form Mode, display form to insert, edit or delete record.
  • 3 - Export Data Mode, export data within current table to .CSV file.
Please note: if the name parameter is not set the default is 0, otherwise 1.
formmode 1 Form mode of UTE.ASP page if in view mode 2 (Form Mode). There are three form modes possible:
  • 1 - Insert Record
  • 2 - Edit Record
  • 3 - Delete Record
record   Number of record to be edited or deleted. This value is only used by UTE if there are no primary keys known (detected or manually set). In this case UTE uses all fields of the record to identify (select) it within the database. This might cause trouble when there are text (memo) fields within the table which contain some special characters. You should really make sure that UTE knows the primary keys of your table !
sql 0 Display the current SQL statement UTE uses to get all records from the database. Valid values are 0 and 1.
definitions 0 Display the field definitions of the table. They will be displayed in both view modes (table and form). Valid values are 0 and 1.
submitted 0 Signals if the form in form view mode was submitted or not. Both buttons (ok and cancel) do submit the form.
fltcount 1 The number of filters being selected to define currently.
fltfield[counter] The name of the field the filter is defined for. The [counter] is an integer counter of the field starting with 1.
fltcomp[counter] = The comparison definition of the filter. The values being taken from the combobox on the filter definition page. Currently available values are: =, >, >=, <, <=, LIKE, IS, IS NOT. The [counter] is an integer counter of the field starting with 1.
fltvalue[counter] The value of the filter. The [counter] is an integer counter of the field starting with 1.
fltcomb[counter] AND This is how the differnet filters will be combined. The values being taken from the combobox on the filter definition page. Currently available values are: AND and OR. The [counter] is an integer counter of the field starting with 1.
flterror If UTE created an invalid SQL statement from an invlaid filter definition this parameter will hold the text of original ODBC error message. It will be used to be displayed on the filter definition page.

 

4.2 Public Properties

Name Type Read/Write Description
DBName string R/W Name of the current database. This is for displaying purpose only. If UTE displays the list of all tables within the current database, the DBName will be will displayed in the headline of the page.
HeadLine string R Headline of the UTE page. This can be used within the <title> tag of your ASP page.
TableName string R Name of currently displayed/edited table. This is the same string as passed via the name URL parameter.
ReadOnly boolean W With setting this property to True UTE will display no links to modify any record and will also prevent modifying the database if the user manipulates the URL parameters.
Default: False
ListTables boolean W Using this property you can show and hide the List Tables in Database toolbar button. Additionaly it is possible to start UTE without any URL parameters and get all tables listed. If this parameter is set to False and UTE is called without URL parameters you will get an error message.
Default: True
Filters boolean W Using this property you can show and hide the Define Filter toolbar button.
Default: True
Export boolean W Using this property you can show and hide the Save as CSV (EXcel) file toolbar button.
Default: True
SQL boolean W Using this property you can show and hide the Show/Hide current SQL Statement toolbar button.
Default: True
Definitions boolean W Using this property you can show and hide the Show/Hide Field Definitions toolbar button in the table and form view.
Default: True
ImageDir string R/W Name of the directory the UTE images are located in. This can either be absolute or relative. Important is the trailing / (slash) !
Default: images/

 

4.3 Public Methods

Name Returns Parameter Description
Init sDSN Initializes UTE. This includes the following steps:
  • Read and verify all URL parameters.
  • Setting the headline according to the view mode and form mode.
  • Open the connection to the database.
  • Analyze the table for primary key and other fields.
  • Load the table (recordset) from the database.
  • If in export view mode create the .CSV file and redirect to it.
  • If in form view mode and the form was submitted do all necessary update stuff.
This function must be called before the first HTML output of your ASP page !

The parameter sDSN is the connect string to the database to be used. See chapter 4.3.1 Connection Types for further informations.

Draw Draws the HTML code for the table or form directly to the HTML output stream by using Response.Write.
getHTML string Returns the HTML code for the table or form as string.

 

4.3.1 Connection Types

You can either use dsn (ODBC) or so called dsn-less connections. Please note that depending on the connection type UTE is not always be able to detect the primary key fields of a table due to differences in the used drivers. If you encounter problems just switch to the other connection type if possible.

dsn (ODBC) connection

If you have created an ODBC database on your machine and connected it to a database you can use the datasource name as connect string:

ute.Init("myDatabase")
If you need to login to the database the login information can also be placed within the connect string:
ute.Init("dsn=myDatabase;uid=myName;pwd=myPassword")

dsn-less connection

Another way to connect to a database is using so called OLE-DB providers instead of ODBC. This is useful if your have no chance to create an ODBC datasource on your web server. An OLE-DB provider will connect to a database directly without using ODBC. The most common case would be to connect to an MS Access™ database being placed in some directory of your website. This is how a dsn-less connect string would look like in this case:

ute.Init("Provider=Microsoft.Jet.OLEDB.4.0;" & _
 "Data Source=" & Server.MapPath("test.mdb")
Examples of other dsn-less connection strings can be found at the ADO Connection String Samples page compiled by Able Consulting, Inc.

 

4.4 Files

This is how the files within UTE are connected to each other:

  • ute_definitions.inc
    Defines all global constants and includes the next files:

    • ute_language_*.inc
      All language depandent string definitions.
    • ute_adolib.inc
      A number of helper functions dealing the ADO.

    • ute_class.inc
      Defines the clsUTE class with a number of private functions being used on loading the page and includes the next files:

      • ute_class_database.inc
        Defines all functions being used in "database" mode.
      • ute_class_table.inc
        Defines all functions being used in "table" mode.
      • ute_class_form.inc
        Defines all functions being used in "form" (add/edit) mode.
      • ute_class_export.inc
        Defines all functions being used in "export" (create CSV file) mode.
      • ute_class_filter.inc
        Defines all functions being used in "filter" (define filter) mode.

 

5 UTE Life Demo

To take a view on how UTE looks and works like in real life just visit my UTE pages at

 

6 Some final words

If you want to learn ASP and/or ADO this application might be a good choice to have a closer look on. On the other side it might be a little bit complex for a beginner, so you decide if you simply want to use it, or alter it.

From version 2.0 on I have placed UTE under the GNU General Public License (GPL). This is mainly to make sure that nobody earns big money from the work of others without sharing his own work also with the rest of us and/or hiding the fact that UTE isn't his own work. I think this is just fair, isn't it ?

Due to the fact that my job keeps my quite busy I have also decided to create a new location for the future development of UTE and to invite everyone to take part in it ! The simple key word is:

SourceForge.net Logo

If you have some good ideas for UTE and want to implement and share them or you have created a new language file please feel free to join the ute-asp project at

Please feel free to join the discussion board here at CodeProject or at SourceForge and if you want just visit my homepage and leave a small note in my guestbook.

Thanks for your interest and enjoy UTE !

 

7 Revision History

1.0 16.02.2000 First Release
  • This version won the first CodeProject Article Contest.
1.1 08.08.2000
  • Bug Fix: Opening an empty table.
  • Bug Fix: Saving NULL fields.
1.2 12.02.2001
  • Improved primary key field detection.
  • Display fields in defined order (and not alphabetically).
1.3 08.03.2001
  • Improved primary key field detection.
  • Bug Fix: Usage of Single Quotation Marks (') in string fields.
1.4 14.03.2001
  • Bug Fix: Wrong Date format in SQL statement when updating a record.
2.0 23.11.2002
  • Completely rewritten.
  • No more session variables.
  • Just one VBScript class to include into own webpage.
  • Ready for localization into any language. Comes already with a number of languages.
  • Option explicit proof.
  • And a number of bug fixes being reported in the past.
  • All future development of UTE will be coordinated on SourceForge: http://sourceforge.net/projects/ute-asp/
    Feel free to join !
2.1 14.01.2003
  • List all tables of a database if no tablename is set as URL paramter.
  • Any number of fields to sort a table after: sort[n], sortdir[n].
    For compatebility porpose the single parameters "sort" and "sortdir" are still valid.
  • Dropdown lists to select page and pagesize instead of links.
  • Custom URL parameters will be kept while navigating through a table.
  • Fixed width of MEMO fields in table view mode.
3.0 28.04.2003
  • Define (any number of) filters to search for records.
  • A toolbar on top of the table view instead of some links below it.
  • Display SQL statment being used to get table data.
  • Exporting the table data as CSV file will no longer create a CSV file in the "/export/" folder. The data will be created and sent "on the fly" to the user's browser.
  • Italian language definition file (by Marco De Sortis)
  • Spanish language definition file (by Agustin Vega)
  • Display Boolean fields as checkboxes instead of TRUE and FALSE.
  • Bugifx: Removed table caching. This was responsible for heavy delay times when opening large tables.
  • Bugfix: when using the sort parameters "sort" and "sortdir" the defined values where not resetted when switching the table using the LIST TABLES mode.
  • Bugfix: unable to update boolean fields in environments other then German or English.
3.01 07.05.2003
  • Bugfix:
    !!! Syntax error ute_class.inc line 1010 (v2.10) !!!
    !!! Syntax error ute_class_filter.inc line 127 (v3.00) !!!
    Due to some mishandling of SourceForge's CVS system I got one INC file in UNIX format and one in MAC format. These formats are obviously *NOT* supported by NT4 PWS/IIS. All files are now plain MS-DOS foramt.
  • Bugfix: error when calling UTE with "pkey" parameter.
  • Improvements in primary key detection.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Tom Wellige
Web Developer
Germany Germany
Member
Tom is in software development for about 15 years. He started with a SHARP MZ80k in Basic and Assembly Language. After collecting some experiance on an ATARI 1040ST he bought his very first IBM XT 286 (incl. 287!) and started to program in Turbo Pascal. He became very familiar with Borland's Turbo Vision and over the last years did a lot of development in C++ (MFC), Visual Basic, VB Script, ASP and SQL. He currently works as senior consultant for Swyx Solutions GmbH, based in Dortmund, Germany.
His absolute favourite is Guinness Wink | ;-) Sláinte!

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionAddind ampusand &memberthepitzaboy14 May '13 - 3:08 
When I try to add a record with & contained in it, currently the tool enters a blank row in the database.
GeneralAccess and Date FieldsmemberAri Disraelly23 Nov '10 - 7:03 
First,
LOVE THIS APP. BEST EVER!!!
Thank you Tom!
 
Where can we paypal to support the project?
Or contribute?
 
More importantly,
Has anyone ever discovered an answer to the problems using ACCESS Database
with tables that have date fields?
 
and subsequently not being able to edit or delete those items?
 
When you click on Show Field Definitions, it comes back as "UnKnown"
And when you process a change, it comes back with:
 
Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression ...
/ute/ute_class_form.inc, line 437
 
Any help would be appreciated.
 
Thanks
QuestionSomething similar in PHP and MySQL ?membersdancer7515 Sep '10 - 8:47 
I really enjoyed this code. I used this for many years and I extended it a lot.
 
Now I am looking something similar in PHP/MySQL. Can someone recommend me something either free or commerical product ?
 
Regards,
sdancer75

QuestionIdentity and Primary key field typememberVartkes Nadjarian12 Apr '10 - 21:04 
I used the editor with access database with no problems. I migrated my database to sql server and everything works except for when i want to insert a new record the value of the identity or primary key field value does not appear on the new record form page which used to appear when connected to the access database.
thx
QuestionError '800a03ea' `, ute_class_database.inc, line 1member2 Meter Ellende27 May '09 - 21:56 
The only thing I get is:
 
Compilatiefout Microsoft VBScript- Error '800a03ea' 
 
Syntaxisfout 
 
/ute_301/ute_class_database.inc, line 1 
 
Response.WriteBlock(4)
^
that's partially in Dutch, but you probably get what it's saying.
(It's got only two Dutch words in it anyway...)
 
I've been looking into that .inc file but can't find what's wrong.
Any clues? Confused | :confused:
Thanks in advance.
AnswerRe: Error '800a03ea' `, ute_class_database.inc, line 1memberTom Wellige18 Jul '09 - 23:40 
Hi,
 
there is no such function call (WriteBlock) within UTE. Are you sure you are using the original UTE version from this page ?
 
Regards, Tom.
 
--
Tom Wellige
http://www.wellige.com

GeneralRe: Error '800a03ea' `, ute_class_database.inc, line 1member2 Meter Ellende19 Jul '09 - 20:37 
Sure is the original.
Funny thing is that in the meantime, I configured a new server (IIS 6.0) and it runs perfectly.
On my old server (Abyss X2 with Selisoft ActiveHTML) it displays the error...
 
Even though I feel Abyss is much easier to manage, I think I'll stick to IIS for the near future.
 
Can't wait to test this on a Oracle DB Big Grin | :-D
Generalproblemmemberemil30028 Apr '09 - 4:18 
my database is using the MySQL.
i have face problem about to update and delete the record and i have found that is the date problem because if the date on one single value such as 2/12/2004 or 2/2/2004 for first value it can not be update and delete. it only can be update or delete for month 10,11,12.
Please help me to solve anunturi
GeneralDutch translationmemberMember 458269121 Oct '08 - 8:58 
<![CDATA[<%
'---------------------------------------------------------------------------
'
' Project: UTE - (U)niversal ASP (T)able (E)ditor
'
' Module: UTE Language Specific Definitions - Nederlands
'
' Version: 3.01
'
' Comments:
'
'---------------------------------------------------------------------------
'
' (c) in 2000-2003 by Tom Wellige
' http://www.wellige.com mailto:tom@wellige.com
'
' This project is released under the "GNU General Public License (GPL)"
' http://www.gnu.org/licenses/gpl.html
'
' and is maintained on SourceForge at
' http://sourceforge.net/projects/ute-asp/
'
' and can also be found on CodeProject at
' http://www.codeproject.com/asp/ute.asp
'
'---------------------------------------------------------------------------
 
Session.LCID = &h0413 ' Dutch (Netherlands)
'Session.LCID = &h0813 ' Dutch (Belgium)
 
' ---- Application ----
Const STR_SORT_ASC = "sorteer oplopend"
Const STR_SORT_DESC = "sorteer aflopend"
 
Const STR_DATABASE = "Database"
Const STR_DB_TITLE = "%1"
 
Const STR_INSERT = "Voeg record toe"
Const STR_EDIT = "Wijzig record"
Const STR_DELETE = "Verwijder record"
 
Const STR_DEF_FILTER = "Definieer Filter"
Const STR_NUM_FILTER = "Aantal Filters:"
 
Const STR_NON_VIEW = "niet te tonen data"
 
Const STR_OK = "Ok"
Const STR_CANCEL = "Annuleren"
Const STR_CLEAR = "Wissen"
 
Const STR_PAGES = "Pagina:"
Const STR_NEXT_PAGE = "naar volgende pagina"
Const STR_PREV_PAGE = "naar vorige pagina"
Const STR_REC_COUNT = "Records per Pagina:"
Const STR_ALL = "Allemaal"
 
Const STR_RECORDS = "Toon Record %1 - %2 van %3 Records"
 
Const STR_POWERED_BY = "Mogelijk gemaakt door %1 %2"
Const STR_FILTER = "Definieer Filter"
Const STR_LIST_TABLES = "Lijst Tabellen in Database"
Const STR_EXPORT = "Opslaan als CSV (Excel) Bestand"
Const STR_DEF_SHOW = "Toon Veld Definities"
Const STR_DEF_HIDE = "Verberg Veld Definities"
Const STR_SQL_SHOW = "Toon huidig SQL Commando"
Const STR_SQL_HIDE = "Verberg huidig SQL Commando"
 
Const STR_DEF_NAME = "Naam"
Const STR_DEF_TYPE = "Type"
Const STR_DEF_DEFINEDSIZE = "Gedefinieerde Grootte"
Const STR_DEF_PRECISION = "Precisie"
Const STR_DEF_ATTRIBUTES = "Attributen"
 
' ---- ADO -----
Const STR_ADO_KEY = "Sleutel"
Const STR_ADO_MAYDEFER = "Kkan afwijken"
Const STR_ADO_UPDATEABLE = "Te wijzigen"
Const STR_ADO_UNKNOWNUPDATEABLE = "Wijzigen onbekend"
Const STR_ADO_FIXED = "Vast"
Const STR_ADO_ISNULLABLE = "Kan op NULL gezet worden"
Const STR_ADO_MAYBENULL = "Mag NULL zijn"
Const STR_ADO_LONG = "Lang"
Const STR_ADO_ROWID = "Rij ID"
Const STR_ADO_ROWVERSION = "Rij Versie"
Const STR_ADO_CACHEDEFERRED = "Cache afwijkend"
 
Const STR_ADO_TYPE_EMPTY = "Leeg"
Const STR_ADO_TYPE_TINYINT = "TinyInt"
Const STR_ADO_TYPE_SMALLINT = "SmallInt"
Const STR_ADO_TYPE_INTEGER = "Integer"
Const STR_ADO_TYPE_BIGINT = "BigInt"
Const STR_ADO_TYPE_UNSIGNEDTINYINT = "UnsignedTinyInt"
Const STR_ADO_TYPE_UNSIGNEDSMALLINT = "UnsignedSmallInt"
Const STR_ADO_TYPE_UNSIGNEDINT = "UnsignedInt"
Const STR_ADO_TYPE_UNSIGNEDBIGINT = "UnsignedBigInt"
Const STR_ADO_TYPE_SINGLE = "Single"
Const STR_ADO_TYPE_DOUBLE = "Double"
Const STR_ADO_TYPE_CURRENCY = "Currency"
Const STR_ADO_TYPE_DECIMAL = "Decimal"
Const STR_ADO_TYPE_NUMERIC = "Numeric"
Const STR_ADO_TYPE_BOOLEAN = "Boolean"
Const STR_ADO_TYPE_ERROR = "Error"
Const STR_ADO_TYPE_USERDEFINED = "UserDefined"
Const STR_ADO_TYPE_VARIANT = "Variant"
Const STR_ADO_TYPE_IDISPATCH = "IDispatch"
Const STR_ADO_TYPE_IUNKNOWN = "IUnknown"
Const STR_ADO_TYPE_GUID = "GUID"
Const STR_ADO_TYPE_DBDATE = "DBDate"
Const STR_ADO_TYPE_DBTIME = "DBTime"
Const STR_ADO_TYPE_DBTIMESTAMP = "DBTimeStamp"
Const STR_ADO_TYPE_BSTR = "BSTR"
Const STR_ADO_TYPE_CHAR = "Char"
Const STR_ADO_TYPE_VARCHAR = "VarChar"
Const STR_ADO_TYPE_LONGVARCHAR = "LongVarChar"
Const STR_ADO_TYPE_WCHAR = "WChar"
Const STR_ADO_TYPE_VARWCHAR = "VarWChar"
Const STR_ADO_TYPE_LONGVARWCHAR = "LongVarWChar"
Const STR_ADO_TYPE_BINARY = "Binary"
Const STR_ADO_TYPE_VARBINARY = "VarBinary"
Const STR_ADO_TYPE_LONGVARBINARY = "LongVarBinary"
Const STR_ADO_TYPE_CHAPTER = "Chapter"
Const STR_ADO_TYPE_PROPVARIANT = "PropVariant"
Const STR_ADO_TYPE_UNKONWN = "Onbekend"
 
' ---- Error Messages ----
Const STR_ERR_1001 = "Ongeldige ODBC Connection String"
Const STR_ERR_1002 = "Missende ""%1"" URL parameter."
Const STR_ERR_1003 = "Ongeldige ""%1"" URL parameter. Moet zijn: numeric."
Const STR_ERR_1004 = "Ongeldige ""%1"" URL parameter. Moet zijn: ""1"", ""2"" of ""3""."
Const STR_ERR_1005 = "Ongeldige ""%1"" URL parameter. Moet zijn: ""%2"" of ""%3""."
 
%>]]>
QuestionInsert/Edit error working with SQL Server 2005memberedu0819 May '08 - 0:34 
Hi!
 
I installed UTE on a server running IIS and MS SQL Server 2005 and I created an ODBC datasource on it.
 
The ute.asp page is working, so it lists all tables of my database.
 
I can also view and delete records, but when I tried to insert a new record or edit an existing record, I got this:
 
Microsoft][SQL Native Client][SQL Server]Could not find server 'MyServer\InstanceName' in sysservers. Execute sp_addlinkedserver to add the server to sysservers.
 
So, I added the server by executing this query:
 
USE master 
GO 
EXEC sp_addlinkedserver 
'MyServer\InstanceName', 
N'SQL Server' 
GO
 
But when I try again, I get this:
 
[Microsoft][SQL Native Client][SQL Server]The cursor does not include the table being modified or the table is not updatable through the cursor.
 
I get the same errors when I connect to the database using OLE-DB providers instead of ODBC.
 
I will appreciate if anybody help me with this issue.
 

Useful info:
 
SERVER MACHINE
--------------
OS: Windows 2003 SP2
Database Server: Microsoft SQL Server 2005
Web Server: IIS 6.0
GeneralOracle Connectionsmemberjdagrageda20 Sep '07 - 5:56 
I tried to connect to an oracle8i database using this connection"sDSN = "Provider=MSDAORA.1.0;user id=scott;data source=xxxx;password=tiger;".
 
The tables will be listed when I click on ute.asp but when I choose a table the following error statement:
Error Type:
Microsoft OLE DB Provider for Oracle (0x80040E14)
ORA-00903: invalid table name
/DataGrid/UTE/ute_class.inc, line 1010
 
It works well in an msACCESS connection.
 
Thanks!
 

GeneralRe: Oracle ConnectionsmemberSilvano Fontes6 Apr '11 - 5:25 
Switch to this provider "Provider=OraOLEDB.Oracle;"
 
Silvano.
QuestionAbout the problem with the Name in columnmemberalby caster12 Apr '07 - 5:48 
Is there any update to the problem to change the records in the column under the name "Name"?
regards and thanks a lot for such a great work
 
alby

AnswerRe: About the problem with the Name in columnmemberPortatofe2 Oct '08 - 5:11 
Very interesting writeup
 

GeneralChange Field textmemberlosorio24 Jan '07 - 18:53 
Hi Tom,
UTE is a simple yet funtionally rich editor for my ms access DBs. Just a quick question, I have a German ms access database that my company has used for our factory label line application called ESPROM. I need to allow some users to to able to update/edit data on this table.
 
I applied UTE for them to use but they complain that some of the fields are in German and they need a bit of translation for them to identify the fields they need to update. Is there a way in the code that can modify to use the caption properties of the table and not the field name (which is in German, of course). This way, when the fields in the table is displayed, the field would be displayed in English (which I intend to use as a caption)?
 
Thanks for any feedback you can provide.
 
Lorvic

QuestionACCESS Date/Time Field Type Shows As 'Unknown'memberMember #371281410 Jan '07 - 22:59 
Hi Group
 
Firstly, is UTE great, or what?!
 
A small problem I have, though, is to show date fields in a dd mmm yyyy (or similar) format rather than the server default of mm/dd/yyyy using UTE 3.01.
 
I saw a post somewhere with a patch for ute_class.inc but that doesn't seem to make any difference. I notice too that the data type for these date/time fields is showing as UNKNOWN when I display the field definitions. I wonder if these 2 things are connected?
 
Any thoughts on this problem greatfully received.
 
PeteB
GeneralCannot open tables that begin with numbers [modified]memberaoxomoxoa_2529 Nov '06 - 8:59 
I am not sure if anyone else has this problem but on any table that begins with a number, I get the following error:
" 80040E14: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '7'. "
 
Any one know why or a workaround? This product is amazing. Good job.
 
Oh and if you rename the table, say to begin with a letter, it works fine.
 
One more thing. I am making an odbc dsn connection to a sql server.
 

-- modified at 15:50 Wednesday 29th November, 2006
QuestionMicrosoft JET Database Engine error '80040e09' [modified]memberJabrams8 Jun '06 - 8:49 
Help!! I get the following error:
 
Microsoft JET Database Engine error '80040e09'
Cannot update. Database or object is read-only.
/admin/ute_class_form.inc, line 428
 
I've searched for days, looking for answers. I know it has something to do with permissions, but all the 'solutions' tell me to do things, that Windows XP Home edition doesn't let me do. What happened is, my web sites' previous host built this database into my website, and when I changed hosts, I can't add new clients to my database.
 
Please, when explaining the answers, be detailed, because I have spent days guessing what people meant when they wrote something, and I couldn't find it like they wrote it. Also, I'm not to savy in databases, so this is all new territory for me.
 
Jason Confused | :confused:
 
-- modified at 14:56 Thursday 8th June, 2006
AnswerRe: Microsoft JET Database Engine error '80040e09'memberTom Wellige25 Jul '06 - 20:34 
Hi Jason,
 
what kind of database are you using ? If it is Access please check if the "IUSER_xxx" user on your machine has full read and write access to the MDB file.
 

Regards, Tom.
 
--
Tom Wellige
http://www.wellige.com

GeneralCan't edit primary keys (and suggestion)memberethan17012 May '06 - 7:05 
Hi, I just found UTE and I love it. However, am affected by this bug, which has been mentioned before: I have tables with a char type primary key. When adding new records, or editing existing ones, I can't access this field. Is there a fix out there for this?
 
And a request for the next version: when editing a field that's linked to a key in another table, would it be possible to have a drop-down list of available options, rather than having a regular input field and then retreiving an error from the DB? This can't be too difficult, but I'm nowhere near being able to do it myself.
 
thanks,
-Ethan
GeneralRe: Can't edit primary keys (and suggestion)memberTom Wellige25 Jul '06 - 20:43 
Hi Ethan,
 
I am aware of this problem within UTE but am currently not able to provide a new version. I am just too busy with other things.
 
The "link table" request has also been made several times. It is on my list for some future version but don't expact any new version soon.
 

Regards, Tom.
 
--
Tom Wellige
http://www.wellige.com

GeneralHelp technology Web Blog!memberquangnam`24 Apr '06 - 20:16 
Do you know technology Web Blog!
can you send me source code and demo it
thanks!
Nam le
quangnam81@gmail.com
 
Namle-VietNam
QuestionHow to display single record?memberDourbest22 Jan '06 - 21:28 
how can i single a single record?
i have done but it display all recordCry | :((
AnswerRe: How to display single record?memberTom Wellige25 Jul '06 - 20:41 
What exactly do you want ?
 
a) display just one record per page
b) select one certain record from a huge amount of records within your table ?
 
For a) set the URL parameter "pagesize" to 1
 
For b) define a filter using the "SQL" button within the toolbar.
 

 
Regards, Tom.
 
--
Tom Wellige
http://www.wellige.com

GeneralProblem with record deletingmemberAugisC7 Dec '05 - 21:40 
When am I trying to delete one record (MS SQL SERVER, then only one field's type is TIMESTAMP), all records are deleting in table.Cry | :((

 
Augis
GeneralSQL Server boolean nulls unsupportedsussggpauly28 Sep '05 - 3:11 
I get the following error:
 
Invalid use of Null:'CBool'
/ccr/ute/ute_class_table.inc, line 136
 

Other tables work fine.
 

Thanks for UTE!
 


GeneralRe: SQL Server boolean nulls unsupportedsussggpauly29 Sep '05 - 5:30 
This error has roots in the HTML interface, which does not support nulls in the checkbox (at least without some cross browser code). I stopped using nulls & cleared it up.
 
Subsequently another error appeared, regarding True and False used for boolean constants. This prevented edits of records containing booleans.
 
I'm not sure I got to the bottom of this, but I offer the following code:
 
line 1127 of ute_class.inc:
 
case adBoolean
sValue = Replace(sValue, "False", "0")
sValue = Replace(sValue, "True", "1")
 

 
-G

GeneralRe: SQL Server boolean nulls unsupported [modified]memberToVent25 Aug '06 - 4:48 
I had problems with CBool as well. I made the changes mentioned in previous response and also modified the "case adBoolean" section of ute_class_table.inc to the following (basically tested for IsNull before CBool):
 
case adBoolean
if IsNull(Field.value) then
sValue = "&lt;NULL&gt;"
else
if CBool(Field.value) then
sValue = _
"<center>" & _
"<img src=""" & m_sIMAGEDir & "bool_true.gif"" border=""0"" alt=""" & CStr(True) & """ " & _
"width=""12"" height=""12"">" & _
"</center>"
else
sValue = _
"<center>" & _
"<img src=""" & m_sIMAGEDir & "bool_false.gif"" border=""0"" alt=""" & CStr(False) & """ " & _
"width=""12"" height=""12"">" & _
"</center>"
end if
end if
 
also had to modify ute_class_form.inc to also check for nulls around line 264:
 

elseif (field.type = adBoolean) then
' -> CHECKBOX
sChecked = ""
if Not IsNull(field.value) Then
   if CBool(field.value) then sChecked = " checked"
   sReturn = sReturn & "<input type=""checkbox"" name=""" & field.name & """" & sChecked & ">"                    
end if
else
 

 
-- modified at 11:01 Friday 25th August, 2006
GeneralDelete all record!!!memberdatasiac14 May '05 - 4:21 
when I select one record to delete, uteConfused | :confused: delete all records in table, like truncate table......
GeneralTwo minor issuesmembermediamaster4010 May '05 - 3:56 
1) Large tables take a long time to load for some reason, a table with 10k rows takes several seconds to load on a dedicated P4 3Ghz, which is quite long. I have looked at the code and didn't notice anything that jumped out at me, if you know what the speed problem might be I could fix it and send you the change.
 
2) When in viewing a table and it has the fields: number, text, memo, the memo column is squished to the side and much of the page is wasted with white space, when it could be used for the memo text. I am wondering if there is some strange spacing happening here?
 
Again, ute is great, these are only miniscule problems.
Generalselect value from listmemberchaoswar15 Apr '05 - 17:54 
How do i change it so that when user adds/modifies a record, the textfield is replaced by a listdown box instead?
 
Eg:
Select operating system:Windows 98
Windows 2000
Windows ME
Windows XP
 
Thanks for helping
QuestionCan not update or delete cos of datemembersevenup8428 Feb '05 - 19:34 
my database is using the MySQL.
i have face problem about to update and delete the record and i have found that is the date problem because if the date on one single value such as 2/12/2004 or 2/2/2004 for first value it can not be update and delete. it only can be update or delete for month 10,11,12.
Please help me to solve
GeneralCan&#180;t update the databasememberstellan1 Jan '05 - 7:07 
I only get the text "The database is lock or writeprotected" when i tried to edit a post.
I don´t understand what the problems is?!
I don´t have the database open and it´s not writeprotected.
 
Best regards: Stellan Haakenstad/Sweden
GeneralRe: Can&#180;t update the databasememberTom Wellige4 Jan '05 - 2:29 
Hi Stellan,
 
please make sure, that the local IUSER_xxx and IWAM_xxx users have full access (read, write) to on the MDB file. This will fix the problem.
 

Regards, Tom.
 
--
Tom Wellige
http://www.wellige.com
GeneralCan't use column name &quot;name&quot;memberCraig S Williams29 Dec '04 - 8:07 
I'm having a problem when I attempt to insert a record into a table where the column name is "name". I get an error about null values (see below). If I allow null values, the record is inserted but the value I provided for name is not stored. If I rename the column to "namez" everything works fine.
Is there a restriction on the column names that can be passed in the URL?
 
Error message:
Cannot insert the value NULL into column 'Name', table 'DiskGrowth.dbo.tblServer'; column does not allow nulls. INSERT fails.
The statement has been terminated.
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

GeneralRe: Can't use column name &quot;name&quot;memberTom Wellige4 Jan '05 - 2:36 
Craig,
 
this is a bug in the current UTE version. When building the SQL statements UTE does not put table and field names into "[" and "]" brackets. This leads to the problem you encounter.
 
I'll try to fix it next week and post the updated version here.
 

Regards, Tom.

 
--
Tom Wellige
http://www.wellige.com
GeneralRe: Can't use column name &quot;name&quot;memberCraig S Williams14 Jan '05 - 5:05 
Tom, would still be interested in seeing this fix.
Thanks for such a versatile & convenient tool.

GeneralRe: Can't use column name &quot;name&quot;memberbwchoi30 Aug '05 - 14:12 
name and mode are being used for other parameter...
so this doesn't work if field name is one of the them.

GeneralProblems with deleting and updating data in a specific tablememberche3ky3 Nov '04 - 18:09 
Great Code!
 
Although i have a small problem! Each time i want to edit or delete data in a table called "rates", I always get an error!
 
HTTP 500 - Internal server error
 
If i click on the refresh button, all the data in that table gets deleted.
Yet i can update and edit all the other tables??
 
Does anyone have any idea why its doing that and any suggestions on how i can fix it?
 
Thanx
Generaltext primary key with SQL ServermemberKen Gould3 Nov '04 - 10:02 
I have a SQL Server table that has a varchar primary key. When I try to update a record it comes back stating that the column [value of the primary key field] is not valid. I then looked at the nType being returned from the form and found -1. I noticed in the AddWhere method that -1 doesn't appear in the case list. I also was not able to find a standard ad constant for field types in MSDN. As a bandaid I added the following to ute_class.inc AddWhere method to get around the problem
 
Private Function AddWhere ( sName, nType, sValue, sCompare, sCombine, bFirst )
Dim sReturn, sSepChar
 
sSepChar = ""
select case nType
case adBSTR, adVariant, adChar, adVarChar, adLongVarChar, adWChar, adVarWChar, adLongVarWChar
sSepChar = "'"
case adDate, adDBDate, adDBTime, adDBTimeStamp
sSepChar = "#"
' added by kbg to allow for text pkey fields 11/3/04
case -1
sSepChar = "'"
' /kbg code
case else
sSepChar = ""
end select
 
I know this is hack, maybe some one can shed some light on a better method. I am using a DSN-less connection, IIS Win2K
 
Otherwise, very nice piece of coding.
 
Thanks
GeneralWon't work with one table.memberjebside28 Oct '04 - 4:38 
The program works great, but for some reason I have one access 2000 table in the database that won't open. I get the follwoing error. 80040E14: Syntax error in FROM clause.
 
Any idea what might be causing this. The table consist of 11 fields of type autonumber, text, yes/no, and memo. The other tables in the database open just fine. the only difference I can see is that this table has the yes/no field and the others don't.
 
If anyone has an idea of what can be done to fix this, I would greatly appreciate it.

 
-jOE -
GeneralRe: Won't work with one table.memberTom Wellige28 Oct '04 - 6:19 
Hi Joe,
 
if you don't mind you can send me your access db (just with the one table included and maybe one or two record in it). I'll have a look on it and see what I can do.
 
-> wellige@swyx.com
 

Regards, Tom.
 
--
Tom Wellige
http://www.wellige.com
GeneralRe: Won't work with one table.memberjebside28 Oct '04 - 7:09 
I will do that. It's a security table, so I'll make a copy and just put some bogus data in. Thanks for your help.
 
-jOE-
GeneralNot So Universal - MySQLmemberjtokach2 Jun '04 - 11:44 
I believe MySQL chokes on the constants.
 
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC driver does not support the requested properties.
/ute_301/ute_class.inc, line 1010

Generaltype mismatch error for non-US Session.LCIDmembermolokoplus27 May '04 - 20:51 
each time i use a Session.LCID for europe as opposed to the US, i get a type mismatch error when trying to update a datetime field.
 
is this problem known to anyone, and does anyone know of a hack to fix this?
 
i've been looking at the include files until i'm blue in the face, but i can't figure out how to fix this.
 
thanks in advance for your help,
 
tom
GeneralRe: type mismatch error for non-US Session.LCIDmemberstewarr30 Jan '05 - 21:50 
This is almost certainly too late for molokoplus but I had problems in not noticing that the wrong English-language file was being included, resulting in the US LCID setting over-riding my already-set UK setting, causing the problem described. I made sure that all UTE LCID settings are commented out - they should not really be there as we should set what we need externally to UTE.
 
Otherwise, a great facility.
 

 
stewarr
Generalnice toolmemberChristian Kiefer30 Apr '04 - 5:02 
thank you
GeneralRe: nice toolsussAnonymous15 Nov '04 - 6:43 
@ Christian
 
UTE is not just a "nice tool"!
UTE is an absolutely great tool!
 
rgds
QuestionDoes it works with Oracle DataBase ??sussSolo197729 Apr '04 - 22:46 
hi all,
 
I have a problem, I've got a Oracle database and when I use UTE I can see all the table of the db but when I click on one I get an error saying
 
Type d'erreur :
Microsoft OLE DB Provider for Oracle (0x80040E14)
ORA-00903: invalid table name
/asp/cockpit_automaitrise/ute/ute_class.inc, line 1010
 
So I wonder if someone have already had this problem and has anyone had already fix the problem
yet ?!?
 
thx for your reply Blush | :O )
AnswerRe: Does it works with Oracle DataBase ??sussAnonymous22 Oct '04 - 3:39 
Hello
I have the exact same phenomena
I get up all the oraqcle (9) tables but when trying to open one -->
 
Microsoft OLE DB Provider for ODBC Drivers (0x80040E37)
[Oracle][ODBC][Ora]ORA-00903: invalid table name
/databas/ute_class.inc, line 1010
 
Frown | :(

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web02 | 2.6.130516.1 | Last Updated 12 May 2003
Article Copyright 2000 by Tom Wellige
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid