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
ADVERTISEMENT
I previously had a post on a problem with the Microsoft SQL server, when I was trying to compare a record in the database with an inputed record, if the record in the database was not exactly the same length as the inputed record, it would not match. i.e. user codes = OAK,BRANT,QUYOU etc.
Unfortunately these records have already been made and they vary in length from 2-5 characters. Im programming in VBscript, does anyone know any functions which will rectify this problem?
i've tried the trim function but this has no effect, I could just change the length of the column so that they are all a similar length and thus will all be comparable, however this is certainly not ideal as an id code only two characters long is not unique, some of the records will clash.
I would like to avoid changing all the records as there are 25 different codes for about 10,000 records. im sure there is some code which could accomplish this but ideally I would like to solve the problem at source.
View Replies
View Related
Can someone tell me the maximum character length of a variable passed to an ASP page via a POST form (i.e. not through the querystring)? I read somewhere that said it was 1024 characters but that can't be right.
View Replies
View Related
My friedn is using PWS on NT4 machine, its a local machine, whenever he directs to an .asp page, visual interdev starts.
How can we over ocme this.I had solved this problem long time ago. Now i dont remember. Also to install IIS4.0 do we need to install MTS? if yes, where can we get
it?
View Replies
View Related
I tried to Display data from field DB (mysql) into a Textarea to edit the text. The code I used is : Code:
<textarea name="warranty" cols="90" rows="6" class="style55" value="<%=WARRANTY%>" type="text"></textarea>
And it does not displays the data.?
View Replies
View Related
In my database table , I have field to store the text, I am tryinf to find the length of the filed in ASP like below
response.write len(rs("cname1"))
It is displaying the value , when the data in the field is nonzero, it is not displaying anything if the filed is mty in table. I cant understand y it is displaying the length as 0 , bcaz i want to compare the length , if the length is zero , it will display one result or else it will display the value.
View Replies
View Related
Alright what I need to be able to do is to make the field it's maxlength if the user does not enter enough characters.
<input type="hidden" name="B" size="10" maxlength="6" value="">
so basicly if the user enters a 5, 4, 3, or 2 digit number the input will be forced to it's maxlength. I need this because I am writing to an SQL db and am combining multiple form inputs into one field in the db table ie(variable = A&B&C&D)
On a different webpage I need to display the variables. I am doing this by string manipulation functions like the one below.
Nbr = mid(aTable1Values(DATA, aRowLoop), 6, 6)
(DATA = A&B&C&D)
View Replies
View Related
Access Database
Field required = no
for i = 0 to 2
arrParap(i) = MakeSafe(Request.Form("ppara_text"&cstr(i+1)),2400)
arrImgp(i) = MakeSafe(Request.Form("pimage"&cstr(i+1)),50)
arrImgpPos(i) = MakeSafe(Request.Form("pimgpos"&cstr(i+1)),50)
if len(arrParap(i)) > 0 then
strQp1 = "INSERT INTO paragraphs(para_page, paratext, paraimage, imgposition)"
strQp1 = strQp1 & "VALUES ('" & objRS1("Subcateg_id") & "', '" _
& arrParap(i) & "', '" _
& arrImgp(i) & "', '" _
& arrImgpPos(i) & "')"
objConn.Execute strQp1
End If
result
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Field 'paragraphs.paraimage' cannot be a zero-length string. /content-builder/admin/pageadd.asp, line 53
View Replies
View Related
Three text fields on a PDF doc. These fields are limited - only 15 lines each.
Strings are separated by breaks and if a string is too long, it wraps to a new line, decreasing the number of items that can go into the field.
So, a for loop from 0 to 14 works only if a string in the array is not too long.
Then, and if and another for from 15 to Ubound -1
Another if and another for. Code:
View Replies
View Related
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
View Related
How to detect field's type in asp with accessing sql server.
View Replies
View Related
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
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
I am doing a page where users will be able to key in the information in a form. However, whenever I tried to insert recordset & insert record, the page will be undisplayed and will be giving me this error: Code:
View Replies
View Related
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
We are running into problems with the script below, whose purpose is to allow users to choose values from drop downs populated by an MS Access DB.
THE RESULTS:
(returns a blank page with only HTML Titles)
THE SCRIPT:
(you may notice this is a modified sample script): Code:
View Replies
View Related
I need to display only a portion (like the first 100 characters) of a field in a database. I don't recall how to do this.
View Replies
View Related
I am using access Memo field to store text of large size. If I use <%=memofield%> in simple display, it does not look like a formatted field and all text comes in a single line without any break.
Even If the text is same like what I am posting in this thread, out come will not have break in browser's display.
View Replies
View Related
From my system, it allow product has multi-category, so I need to save
all category names which one product belong to into one field on a
database,
and record saved like " nameA|nameB|nameC " - seperate by "|".
question 1:
the second time when i update the record for same product name, how to
have a record
like "nameA|nameB"
After multi-category name saved, then, i would like to generate a
navigate name with the link like
home > nameB > name of product
question2:
so how can i retrieved only one name from category field.
View Replies
View Related
I so thought I had this down and I was getting excited, but when I ran it, it didn't work. I've tried a few different things and I can't get it to work (not smart enough I guess). Code:
View Replies
View Related
I have a timesheet application I'm working on. The user fills in a form which sends data to an Access db. On the results page I need to display the values from 2 fields; i.e if the user selects "Report Writing" from a drop down list, I need the data contained in another column called 'Codes' to display as well.
View Replies
View Related
I have a DateTime stamp in one of my Access database columns. Using now() as the default value, it enters records in the following format:
17/06/2005 14:28:40
This is perfect. UK format, just as I want.
However, when I pull this record into an ASP page it appears in a different format:
6/17/2005 14:28:40 AM
How can I stop it from re-writing the data into American format? I just need to display it exactly as it is in the database.
View Replies
View Related
I have a VBScript function:
<script language="VBScript" type="text/vbscript">
Function Main()
set wshshell = createobject("wscript.shell")
struser = wshShell.ExpandEnvironmentStrings("%USERNAME%")
strdomain = wshShell.ExpandEnvironmentStrings("%USERDOMAIN%")
msgbox struser & strdomain
End Function
</script>
That works great as a Active X script but I want this to display as a value in a text field and I can't find how o do that.
View Replies
View Related
i have a field in my form which auto adds the date to my database, its inputs as 1/09/2007 and what im after is when i retrieve that data to be displayed i would like the date to be displayed as 9th September 2007,
View Replies
View Related
How would I get the max record + 1 to auto-populate in the GMVINC form field? I have a feeling that my query is not correct. Code:
View Replies
View Related
I need to parse a string from a single, semi-colon delimited, 60 character
field (el_text) in a recordset and display the results in a table on a
webpage (ASP)
I can retrieve the recordset from the database and display the field data
results in rows of a table but have the entire 60 character string in one
cell. I need to break that string apart and put each semi-colon delimited
value in it's own cell. Then move to the next record and do the same thing
in the next row of the table. - and so on
I'm using ASP, VB Script with DMSII Database and OLEDB
Does anyone have some code examples on how to break this field apart and
then arrange the data into an html table on a webpage?
View Replies
View Related
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
i define Dim total as int but the total's value cant exceed a certain big amount. is there any long data types or double, which can be used?
View Replies
View Related
i am getting this error Code:
Microsoft OLE DB Provider for SQL Server error '80040e07'
Syntax error converting the varchar value 'Canvas' to a column of data type int.
/store/administrator/special.asp, line 98
what i am doing is selecting an item from the drop down and i have textbox i want to display the items price from the table here is the code:
View Replies
View Related
I am trying to do a comparison between two values and am getting the following error:
Microsoft JET Database Engine error '80040e07'
Data type mismatch in criteria expression.
The code that is creating the error is as follows:
sb = Request.Form("storyboardscreen")
if Not Lcase(Request.Form("AllStoryBoard")) = "all" then
whereClause = whereClause + "theStoryboard = " + sb
end if
I am using the statement to build the where clause of my query. The sb value is retrieved from a pull down menu and "theStoryboard" column is the db is of data type "text". The values stored in the field are 12 digit numbers. I have tried doing a cstr to sb but that doesnt work, any tips on what I am doing wrong? I am using asp with an access db.
View Replies
View Related
I'm grabbing data from an XML web service and storing the values in ASP variables. I'm trying to apply the cDbl function to values returned and I'm getting the following error:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'cDbl'
The data prints to the screen just fine
View Replies
View Related
can i put my operators into an arry, as i want to loop them later in a loop. but i have problem declearing the data type of the arrys.
Dim operatorsArray(4) As ?????
operatorsArray(0) = "+"
operatorsArray(1) = "-"
operatorsArray(2) = "*"
operatorsArray(3) = "/"
what should the data type be to work. can i have an example of how i am going to
use it.can it be done this way eg.
2 operatorsArray(0) 3 operatorsArray(0) 4 operatorsArray(0)does the above interperate as 2 + 3 + 4?
View Replies
View Related
I am calling a javascript function in my asp. I am passing a recordset value, a 7 digit integer, to this javascript function. However, in the function this value is not coming in correctly. say for example i am passing 0360001, in the function when i pass it to another window, its going as 122881.
I am asuming its because of the size of the default integer data type. If you think thats the reason, how can set a long integer data type to this value, if that can be done in asp.
View Replies
View Related