SQL Text Datatype
I just modified a SQL table field's datatype from char to text to accomodate
more text, and suddenly the results are not being displayed on my webpage.
Has anyone encountered this before?
I just modified a SQL table field's datatype from char to text to accomodate
more text, and suddenly the results are not being displayed on my webpage.
Has anyone encountered this before?
I have a table (MSSQL 2000 server) with a column called "Content" whose datatype is text. Now I'm trying to insert data into the table using a stored procedure. What is the ADO constant that I should use to insert value into that column? Code:
View Replies View Relatedthis is really urgent and i cant seem to figure this out.I have his text area, once the user hits the save button, it tranfers the data to a memo datatype field in the database.
ok here's the thing...every time I copy paste something, this thing throws up a wierd error..:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression '('text here....
I initially though it would ahve been becuase of the number of characters, but that was not the case.When i type things in and save , e'thing works fine
I just stumbled into something which kinda of makes sense but I'm not 100% sure about.
I have a field as nvarchar.
I had the sql checking it: select blar from blar where blar = 0
weird thing is in the enterprise manager DTS the query parsed as ok. Overall the DTS failed because it came across some characters it said it couldn't handle.
The query changed to: select blar from blar where blar = '0'
and everything worked fine from there on.
---
What I'm wondering is, can nvarchar accept numeric values as well as string values?
if it can then the above all makes sense, if it doesn't... have I just found a bug?
I m updating a table which contains a field with datatype=ntext.
I use a stored procedure to insert/update data in it.
SP's parameter's data type is ntext.
Following is the code in which i created the parameter.
Code:
SET objParam1 = objComm.CreateParameter("@xmltempSrc",adLongVarChar,adParamInput,1073741823,txtXmlConte nt)
objComm.Parameters.Append objParam1
when i execute it, it give error as :
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]Error converting data type text to ntext.
I m using Sql server and ASP.
i am having a small problem here i use sql server 2000 and in it the fields datatype is money i am displaying some items and here is how i do Code:
View Replies View RelatedI'm getting an error message "An unhandled data type was encountered." No line number, no nothing. Any ideas on what to look for?
View Replies View RelatedI have my code like this
checkintime="07/13/2006 5-6pm"
Set rs = Server.CreateObject("adodb.RecordSet")
strsql = "Select * From ProfTime WHERE Time1 ='" & checkintime & "'"
rs.Open strsql, conn, 2, 2
getid=rs("Prof_Id")
Time1 field is of varchar datatype
When i run the code it gives me an error saying
Microsoft VBScript runtime error '800a000d'
Type mismatch.
I need to write a function that takes four inputs and returns a value based on that.
For example, the inputs are name, country, state and city.
I have 25 rows and 5 columns of data. The data would be like this.
Jay, USA, CA, san francisco, san mateo, san bernadino, oakland, berkeley
Mike, Canada, Ottawa, montreal, toronto, edmunton, niagara, london
if the input values are jay, usa, ca, san mateo- the function needs to return
the next value in the row which is "san bernadino".
If I could store these values in the database, I could just write a query that
would give me the output. But don;t want to make a trip to the database. Code:
I have a problem to use the bit field, I know that accept the value 0 like false and -1 like true.
When I do the insert into and i put value -1 i receive an arror, if i put 1 and i try to read no the database i receive ever the value false. How can i correctly use this datatype?
how do i define an array datatype I want to insert double datatype values in it.
View Replies View RelatedIf execute the following sql on my MySQL database -
sqlremove = "UPDATE fib_note SET fib_note_actdone = 1 WHERE fib_note_id = '" &Request("id") &"' "
It seems to also be effecting another field in my table called fib_note_timestamp which is a timestamp data type with a default value of current_timestamp. How come and how can I stop this?
How do I convert one DataType to other using the CType Function?
and can you show some examples......
Does anyone know how to change the ordinal number of a field and the field datatype in Access using ASP?
View Replies View RelatedUsing ASP, I'm fetching a currency datatype from an Access database. When displaying the results, it shows "2" instead of "$2.00"
I know about FormatCurrency, but if the datatype is currency, should it not come out looking like currency?
I encountered a problem where I am retrieving a field from a recordset that is in the Money datatype and I then store it into a variable, exampe;
cur_BBOAmount = rsgetBBOAmount("BBO_Amount")
I am now trying to see the contents of cur_BBOAmount but nothing is showing up. In my if statements, I checked against blanks, I checked if it was zero, and I checked if it was Null, but nothing seems to work. I checked the variable type using response.write typename(cur_BBOAmount) and that returned the Currency datatype.
My question is, how can I test the value of this variable that is of the currency datatype?
I'm updating a record by opening a recordset, setting the fields and the
updating it with objRS.Update.
I need to set an image datatype to NULL. objRS("field") = NULL works for
datatypes int and varchar but not for datatype image, although there is no
error - the image field still contains the image!
I'm using SQL server and running an UPDATE statement including image = NULL
works.
I am repeatedly getting the error message 'error converting datatype varchar to bit'. I am passing a varchar variable to a stored procedure (where it is also a varchar) and then trying to write it to a table (where it is also a varchar).
View Replies View RelatedFound that the code offered by aspupload to retrieve image datatype needs to be altered to work with MS SQL whereas it works fine with MS Access.
The following piece of code has the BinaryWrite executing prior to the ContentType request:
<%
' AspUpload Code samples: filelist_download.asp
' Invoked by filelist.asp
' Copyright (c) 2001 Persits Software, Inc.
' http://www.persits.com
' The file must not contain any HTML tags, not even HTML comment tags <!-- ...-->
' Build ADO connection string
Connect = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath(".aspupload.mdb")
' If you use SQL Server, the connecton string must look something like this:
' Connect = "Provider=SQLOLEDB;Server=MYSRV;Database=master;UID=sa;PWD=xxx"
Set db = Server.CreateObject("ADODB.Connection")
db.Open Connect
SQL = "SELECT * FROM MYIMAGES where id = " & Request("id")
Set rs = db.Execute( SQL )
If rs.EOF Then Response.End
' Send actual file
Response.BinaryWrite rs("image_blob")
Response.ContentType = "application/octet-stream"
' Let the browser know the file name
Response.AddHeader "Content-Disposition", "attachment;filename=" & Trim(rs("filename"))
' Let the browser know the file size
Response.AddHeader "Content-Length", CStr(rs("filesize"))
%>
I have this problem in controlling a the text in a Text Area. How can I do
that for example the field size is 200, when it reaches 50 it automatically
goes to the next line. Bcoz im having problem when viewing it in my report,
it continuesly views in a strieght line and im having problem in printing.
When using ASP's FileSystemObject to create text files, I am unable to get user submitted text (in Hebrew) to save as anything other than "?????". The text file is being saved in Unicode and setting the CodePage in ASP proved unsuccessful. Strangely, hard coded Hebrew text in an ASP variable does add to the text file correctly.
Any ideas of why this happens and how to get it to work correctly?
I have a text area which I want to limit the number of words or number of text entered into it. Is this possible?
<textarea name="textarea" cols="35" rows="5"></textarea>
In the text area above, can I say limit the person filling in the text area to say 100 characters?
I have a form on asp page that pulls info from a DB when the page loads.
It them puts the info into text boxes on the page that are editable by the
user.
The only problem I have is say in the description text box it should
read "HP Laserjet 5Si" , it always cuts the text off where it just says "HP"
.. It does this on all the text boxes? I can't seem to figure out why it
is doing it. Here is the sample code:
With quotes around <%= vdesc%>
<td><input name="desc" type="text" id="desc" size="45" value="<%=
vdesc%>"></td>
And I tried it without.
I have text in a field coming from a database. The text has various
forms such as:
text1
text1 or text2
text1 or text2 or text3
text1; or text2
text1; or text2; or text3
etc...
how can I parse this with a reg ex? I tried this:
(.+);? or
but it only captures 1 submatch (text1) and only if theres an "or"
after it
I'd like to get 1 submatch for each piece of text separated by the
"or", just the text itself if there is no or.
Anyone know how to do it?
I have this problem in controlling a text in a Text Area. How can I do that, for example the field size is 200, when it reaches 50 it automatically goes to the next line. Because im having problem when viewing text in my report, it continuesly views in a straight line. Can you give me ASP code for that.
View Replies View RelatedI have text - ARI Promise, when I hover over the text I would like a box to appear with the Promise information. It would be several paragraphs that need to be formatted with paragraph and bullets. Is this possible to do? If so how would I go about it?
View Replies View RelatedI have a search page, after search returns value I want to display fields in text box instead of table.
View Replies View RelatedI am getting the above error in an asp page. Not sure why? The error details is given below. Code:
View Replies View RelatedI'm trying to make a text box for comments. I know how to put one value into a text box like name, but i'm not sure how to pull multi-values. I want to be able to display the time,user and comment in a text box. I don't know how to go about this. The comments are stored in a different table and there can be many comments for one policy.
What i did was i have asp code the displays all the comments and puts it into a table, but i want to put this into a text box not sure how to go about it. Here is the code i'm using. the reason why i need it to be in a text box is so the user can update it, does anybody have any ideas. Code:
I have a drop down as below.
<select id="drp1">
<option value="1">One</option>
<option value="2">Two</option>
</select>
I need the text value of the drop down box.
Request.form("drp1").value is giving 1 , but I need the value "One". How can
I do this.
1) How do I check for a text box with a null value?
2) How do I check for a text box that doesn't have a valid number/ integer inside it?
I am trying to create a text box in ASP which automatically populates itself with the person's name who is currently viewing the page.I want it to retrieve the name from Active Directory.The text box populates itself when the page is loaded.
The Active Directory code for name is 'cn'.So when logged on users name = 'cn' display the name in the textbox.
I'm putting a standard mail page together, that will allow my users to
sent templete emails out to people.
The files are stored in textfiles.I have come up with a script to produce the names into a Select list, but know i'm wanting them to be read into a textarea box,to allow me to submit them into from the form into the sendmail.asp page! but the only way i can pass them out, is into a iframe, whichd oesn't seem to allow me to then pass them into the sendmail.asp page.