Get Field Type

I am in the process of redeveloping a number of applications on our corporate intranet. One of them currently accesses an Oracle database, which I am transferring to MS SQL, as well as tidying up the ASP. I am unable to access the db to see the data types in any conventional way, but I can run a SQL query in an ASP page to get the types. Unfortunately, this is returning a numerical value for the data type, rather than a meaninful name, e.g.

Field Name Type Size
ID 139 20
INITIALS 200 10
SURNAME 200 40

I am assuming that 139 equates to ID and 200 to nvarchar, but does anyone have or know where I can get a definitive guide to what these numbers really are?

View Replies


ADVERTISEMENT

Detect Field's Type

How to detect field's type in asp with accessing sql server.

View Replies View Related

Contents Of Field Type

I am writing vbscript code in an .asp page.I need to display field values from a sql table consisting of several fields, one of them is of type "Long Text".This field contains XML data. I like to be able to assign vale of this field to a variable display it and write out a text file using file streaming object.

When I set a variable to this field, the data is truncated.I am using "Recordset" object, is that not an appropriate type to retrieve <long Text> fields.

View Replies View Related

Field Type Nvarchar

i have a simple table with a field called "authors". this filed have a nvarchar(max) type (in MSSql 2005). i have a simple query "Select authors FROM table". in query analizer this return the value of authors, but when i run this in asp page, the field is empty.

in the code i have:

Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, Conn, 1, 1

but rs("Authors") is empty.

If i change the type (and i use nvarchar(4000) for authors) there is no problem. for the connection i have Driver={SQL Native Client}.

View Replies View Related

Doesnt Display Char Type Data Field Length 1

I have one field char type data length 1.. It has data either 1 or 2 in all the field tht I have checked through enterprise manager.

I'm running query:

"select * from table" and fetching all the records and displaying...

It display all the data except data from this field..Doesnt display anything..

I had put Response.write rs("fieldname")

What could be the problem?

View Replies View Related

Viewing A Field With A "time" Type

im trying to view one of my fields in MySQL DB with a "time" type:

rsShowTime ("stime")

output is:

7/5/2004 hh:mm:ss AM

in my DB the record only shows hh:mm:ss, how come it outputs "7/5/2004 hh:mm:ss AM"?

i only want to have hh:mm:ss as my result.

View Replies View Related

Error Type:Microsoft VBScript Runtime (0x800A000D) Type Mismatch: 'UBound'

I got a problem while running an application. The code for this is as follows:

aList = Split(strMsg,";")
For nX = 0 to UBound(aList)
strarry=split(aList(nX),"_")
var_year=left(strarry(2),4)
var_month=mid(strarry(2),5,2)
var_day=mid(strarry(2),7,2)
var_date=var_day&"-"&var_month&"-"&var_year
var_time1=mid(strarry(2),9,2)
var_time2=mid(strarry(2),11,2)
var_time=var_time1&":"&var_time2
set rs1=conn.execute("insert into tbl_BackupfileInfo(Filename,Createddate,Createdtim e)values('" &aList(nX)&"','"&var_date&"','"&var_time&"')")
Next

while runnig this application some times it works fine .But some times it giving an error

Error Type:Microsoft VBScript runtime (0x800A000D) Type mismatch: 'UBound'.

View Replies View Related

LEFT JOIN On A Date Field And A Numerical Field - Using WHERE Clause

I am using a Relational database for my site and i have the following tables:

FIXTURES, GAMEDATES

the fields in FIXTURES are:

GameDate
Home
Away

(All of the above are numerical fields)

the fields in GAMEDATES are:

DateID(integer)
GameDate(#Date Field#)

What i have done is in the GAMEDATE field in the FIXTURES table i have used the ID number of the date that i wish to assign to that record - using a LEFT JOIN to display the actual date that is pulled from the GAMEDATES table (That which corresponds to the relevant id used in Fixtures)

The problem is that in some of my code i want to display records using sql and sometimes in the where clause i use the following:

WHERE Fixtures.GameDate<=(Date())

obviously meaning WHERE GAMEDATE is LESS THAN or EQUAL to TODAY.

The thing is when i use the join it does not use the where clause and displays all of the records in the FIXTURES table.

Does any one know how to get around this, i have not received any error messages it just isnt displaying the right data

View Replies View Related

Comparing Field Data From Previous Field

Im comparing values in a field while doing a loop if sAct<>myData(5,i) then At the end of the loop I make the value of sAct equal the current myData

This will work when comparing other fields withing my recordset (so I know the statement works) but it will not work for the field I want to compare. The only difference with this field is that it has null values. Could this be the problem? if so, how do I deal with nulls?

View Replies View Related

Error Type :(0x80004005) Unspecified Error Type

I am trying to send a fax from my asp application and am getting the follwoing error on the hghlighted line:

Error Type:
(0x80004005)
Unspecified error

If anyone knows why..Code:

View Replies View Related

Type Mismatch On Type "Text"

I have a table with four fields, ID (auto increment), question (varchar(200)), answer (Text), and shop (tinyint(3). When I connect to the database in an ASP page and write this code

Response.Write rs("question") & "<br />" & rs("answer")

I get an error that reads "Type Mismatch"

but if I change the type of the answer field to type varchar I don't get the error but am limited in the length of the field's contents. I just also noticed that if I keep the type at TEXT and change the collation to ascii_general_ci I don't get the mismatch error but all the ' characters turn into ? characters? Oh woe is me.

View Replies View Related

Fill Field Based On Another Field

I have a input form with 5 fields. One of the fields is MajorNo and the other is named Description.

I have a reference table in my MS Access database (tblMajor)that lists the major numbers and their descriptions.

I would like to have the description field in my ASP automatically filled based on the major number entered on the form, so the user will only need to input the major number when submitting to the Access table (tblSalesTotal).

View Replies View Related

Pass Hidden Form Field Value To Another Form Field To Insert In Db

I am trying to pass a hidden field value on a form into another field on the
form so that it can then be inserted in the database, to enable me then to
reference that number at a later date.

(The hidden value (1 for example) would then automatically get passed to the
other input field.)

The code for the text field that allows users to type an number into it for
submission to the db is below, but what code do i need within the hidden
field to populate this text field below so that users do not have to type the
number in? Code:

View Replies View Related

How Can I Change One Line Input Field Into Larger Input Field

I have being working with making an edit field over the past few days. The edit function is now working fine. The edit fields that i have are for id, subject, notes, timedate.

All of the edit screens are one line text screens. What I want to do now is increase the size of the notes box to a larger textarea type box to make it easier to edit notes. The notes field in the db is a textarea field. Code:

View Replies View Related

Automated "state" Field From "Country" Field

When you select the "Country" field in a Hotmail "get new account" link, the field "State" changes automatically, giving you the correct States that belongs to the chosen Country.

View Replies View Related

Looking For Glossary Type App

I was looking for an app that i could use as a glossary, though i'm not sure how you would refer to it.

Basically, something that has 0-9 and A-Z with a search feature, by hitting G, all the items starting with G would appear, etc.

View Replies View Related

Type Mismatch

I am moving a mySQL db from one server to another. My backup sql is coming from phpMyadmin and I am using another 3rd party db admin program on the server. I am copying and pasting this code:

View Replies View Related

Type Mismatch

I have an access database, with a form field "scores", which is a text field. This is the code (i have included the database code in the script btw):

<%

Dim scoresql,scorers
scoresql = "SELECT * FROM users"
Set scorers = conn.execute(scoresql)

Do

scores = Split(scorers.fields("scores"),"~")

Response.Write(scores)

scorers.movenext
Loop while not scorers.eof

%>

I can't tell what's wrong.

View Replies View Related

Type Mismatch

if you can I am getting this errror:

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'FormatDateTime' /bb/aspBoardDetail.asp, line 57

<tr><td><font face="<%=abFont%>" size="-1">When: <%=FormatDateTime(adoRs.Fields("msgTime").Value, 2)%>&nbsp;<%=FormatDateTime(adoRs.Fields("msgTime").Value, 3)%></font></td></tr>

View Replies View Related

Type Mismatch

After about 30 minutes of frustration I finally discovered what was
causing a general 500 internal server error and to my surprise it was
something I seem to always take for granted for its simplicity. A type
mismatch error trying to compare a string to a numerical value, which
is something that PHP has no problem or qualms with. However, this
continuous problem continues to haunt me year after year and has
brought me to tears with frustration. This is the line that raises the
error:

nID = Request("ID")
If IsNull(nID) Or IsEmpty(nID) Or nID = 0 Then
.... (and so on)

In the past I've written a function 30 lines long that compares values
by confirming value types of the variables first, but I would rather
put a gun to my head than do that. Since there are obviously other
bright PHP and ASP developers out there that constantly trip over this
problem, I would like to know your suggestions or methods of working
around this.

View Replies View Related

Day(Date) Type

I am new to ASP programming and I am trying to get an existing website to work.
I have created the following function to get the day:

function nrDate()
nrDate = DAY(Date())
end function

But when I use the page it gives the following runtime error:

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'DAY'

I have googled the problem for hours but cannot find anything that may be helpfull. Does anyone have any ideas because this is getting quite urgent and I cannot move forward without this function.

View Replies View Related

Type Mismatch?? WTF??

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'getTableFields'

Line is commented.

set exclusions = Server.CreateObject("Scripting.Dictionary")
exclusions.Add "id", true
exclusions.Add "timestamp",true

set tableKey = getTableFields("CIL_Addresses",exclusions) ''''TYPE MISMATCH ON THIS LINE

May be helpful to see getTableFields()

Code:

View Replies View Related

Type Mismatch

Any Idea what this might mean?


Microsoft VBScript runtime error '800a000d'

Type mismatch: '[string: ""]' /App/Director_Appraisal_Results_Saved.asp, line 444

View Replies View Related

This Type Of Error Mean

Does anyone know this type of error means?

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Could not use ''(unknown)''; file already in use.
/asp/PPLMain/memberpage.asp, line 10

and in my line 1o is
RsMember.ActiveConnection = MM_connPPL2_STRING

This works before but then it went like this. Anyone can help?

View Replies View Related

Type Mismatch

I am receiving the following error:

Type Mismatch '[String ""]'

Here is the code that the error seems to be referring to:

For i = 0 To UBound(Duties)
dblTotal = dblTotal + Duties(i)
Next

Do I need to convert these variables to Integers?

View Replies View Related

Files Of Type

How do I set the Files of Type to only jpg extensions from this <input type="file" value=".jpg" name="File1" size="20"> the red above wont work.

View Replies View Related

Xml Mime Type

I use Server.CreateObject("MSXML2.ServerXMLHTTP") etc to grab the content of
another asp page.
I want the other asp page to look like an xml document. So I set the header
to text/xml with the line
response.contenttype="text/xml"
I set this on the calling page and the page that is called.
When I view the headers with http://pgl.yoyo.org/http/server-headers.php it
is still set to text/HTML. Also the browser displays the page as if it were
HTML, not XML

View Replies View Related

Data Type

What data type do you use for this input -- uyen8976? how do you convert it to a string? how do you query it?

I tried to create a table in sql with this field
invoice char not null

inv=request.form("inv")
qInvoice= "select invoice from ItemMaster where invoice=" + cstr(inv)
rs.open qInvoice, "dsn......"

when i tried to query this field, computer didn't understand what cstr(inv) was. It kept reporting errors.

However, i couldn't use varchar data type for uyen8976 either. The computer didn't let me convert "uyen8976" into a string.

View Replies View Related

Type Mismatch

I pass session variables in a querystring to another page, which increments an array and adds them to it. This had been working absolutley fine on my local machine and I uploaded the scripts to a remote server. Everything worked fine (and still does) on the remote server.

I then decided to try opening the script that receives the querystring in a popup with javascript window.open, to display the results in the popup instead of a full new page as before.

When I tried this I got a Type Mismatch on the receiving page. I hadn't changed any of the code in any of the pages apart from calling the receiving page with window.open, so I thought it just didn't like being called/opened that way. So I removed the window.open and went back to the old way - and I still get the Type Mismatch.

I couldn't see why it was throwing this now, so I downloaded the scripts from the remote server (which work fine) to my local machine and I still get the Type Mismatch on the local machine. I tried stopping and starting IIS and then rebooting, but to no avail. It still works remotely but not locally.

The mismatch is occuring apparently between the String I'm trying to add to the array and the array index (which is also a session variable): Code:

View Replies View Related

Type Mismatch

i am getting a type mismatch for a page i am trying to write. Code:

View Replies View Related

Type Mismatch

i'm getting a type mismatch error

conn.Execute "DELETE FROM Bmemo WHERE (tDate <= '" & date() & "')"

tDate is a date field in an Access database

View Replies View Related

Type Mismatch

Like so many, I will preface my question by saying I'm a complete ASP noob. I am however very experienced with PHP/MYSQL so I understand the concepts, it's just a syntax problem.
I have the following:Code:

sqlGroups = "select groupName from Groups where groupID = '" & rsParts("groupID") & "'"
set rsGroups = Server.CreateObject("ADODB.Recordset")
rsGroups.Open sqlGroups, strConn

response.write(rsGroups("groupName"))

This is resulting in a type mismatch error. rsParts("groupID") is from another recordset in the script, of type Long Int. groupID in the Groups table is autonumber, also of type Long Int.

View Replies View Related

Content Type

I am currently taking a lot of web form information and compiling it into a word document for users to download; however, I want to be able to embed any attachments
that they have inside the word document. The attachments are coming from a database and the office suite does not reside on
the server. Does anyone know if it is possible to create a word document with embedded attachments for download.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved