Sunday, March 25, 2012
ASP...
retain the value in the corresponding area (text, radio button, texarea, dro
p
down menu)in the first page when i press the back button on the second page.
--
regards seowhuaYou've posted to the wrong newsgroup - this is for SQL Server, not ASP
programming. I'd try posting your question to one of the
microsoft.public.dotnet.framework.aspnet.* newsgroups. (Ditto for your
"ASP Calendar..." post too.)
*mike hodgson*
blog: http://sqlnerd.blogspot.com
seowhua wrote:
>Let say I pass values from first page to second page using a form, how can
I
>retain the value in the corresponding area (text, radio button, texarea, dr
op
>down menu)in the first page when i press the back button on the second page
.
>sql
ASP, SQL, long text data problems...
then save it into SQL server, and retrive and display the info on
another page. My problem is with long text data (10,000 bytes or
more). It appears to save the long text data, as in it gives no
errors... but it does not save it. In the SQL table, the field is
defined as ntext... So why won't it save?
Thanks in advance,
adamAdam (ootena@.imsg.com) writes:
> I have an ASP page that will take form info that a user has entered,
> then save it into SQL server, and retrive and display the info on
> another page. My problem is with long text data (10,000 bytes or
> more). It appears to save the long text data, as in it gives no
> errors... but it does not save it. In the SQL table, the field is
> defined as ntext... So why won't it save?
I guess you need to post your code, so that people here can have a
reasonble chance to spot your error. You are using the AppendChunk on
the Field object?
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Adam (ootena@.imsg.com) writes:
> I guess I need an example of the GetChunk, AppendChunk... I havent
> been able to find one that makes sense to me.
In the MDAC Books Online there are examples of using AppendChunk. This
should also be on MSDN.
Did you try searching for AppendChunk on Google? I seem to get quite some
hits.
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Cool, thanks for the books online... that helped a lot later man
Thursday, March 22, 2012
ASP returning null sized field from MS SQL database
One of these fields is a large(ish) amount of text data up to 400
characters and has been cast variously as varchar, nchar and text
type to overcome a problem. The problem appears to be in retrieving
the data via ASP. I understand that ASP can handle string data of this
size so I am okay there.
When the records are retrieved from the db, the data string length =0.
I know the data is there because I have written a Delphi data manager
which interrogates the db and shows all records and their contents.
So if ASP can handle strings this size and the data is there, why do I
get a data length of zero bytes returned when I interrogate the record
set?
Whichever way I cast this field I get the same result.
I know the code is sound as it works locally through a MS SQL server
on my PS.
Anyone have this problem or know what's causing it? I have logged a
support call with my hosting company, but they haven't replied as yet
and I am stuck on an urgent project.
Any suggestions?
Cheers
GrantGrant Davis (grant@.gbdavis.com) writes:
> We currently have an SQL db running on a web server.
> One of these fields is a large(ish) amount of text data up to 400
> characters and has been cast variously as varchar, nchar and text
> type to overcome a problem. The problem appears to be in retrieving
> the data via ASP. I understand that ASP can handle string data of this
> size so I am okay there.
> When the records are retrieved from the db, the data string length =0.
> I know the data is there because I have written a Delphi data manager
> which interrogates the db and shows all records and their contents.
> So if ASP can handle strings this size and the data is there, why do I
> get a data length of zero bytes returned when I interrogate the record
> set?
> Whichever way I cast this field I get the same result.
> I know the code is sound as it works locally through a MS SQL server
> on my PS.
> Anyone have this problem or know what's causing it? I have logged a
> support call with my hosting company, but they haven't replied as yet
> and I am stuck on an urgent project.
> Any suggestions?
Yes one: Post the relevant pieces of your code. Today it is a beautiful
day here in Stockholm, the sun is shining from blue skies. Nevertheless,
I am completely in the dark about what you are doing.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
ASP Calender...
Can I know how can I build the calender. Normally a calender image will
shown besides the date text box. When we click on it,a calender will pop up
and if we select a value from it, the date will be inserted in the
corresponding text area.
TQ
--
regards seowhuaI think you might be in the wrong newsgroups. This is the SQL group :)
Now, if you want a table to store a calendar :)
----
Louis Davidson - http://spaces.msn.com/members/drsql/
SQL Server MVP
"seowhua" <seowhua@.discussions.microsoft.com> wrote in message
news:51073539-0E05-4FB8-B932-CDCFB7444B31@.microsoft.com...
> Hi,
> Can I know how can I build the calender. Normally a calender image will
> shown besides the date text box. When we click on it,a calender will pop
> up
> and if we select a value from it, the date will be inserted in the
> corresponding text area.
> TQ
> --
> regards seowhua
ASP and SQL2000 drop-down menu
I have a form with 2 drop down menus and a text field that I am concerned
with. Size, Packaging, and Cost. Size and Packaging pull their info from a
Size and a Packaging table respectively. I need the third field, Cost, to
take the values selected by the user in the Size and Packaging fields, and
use those values to query a third table "Cost." The Cost Table has three
fields: Size, Packaging, and Cost (The cost field is always different
depending on the Size and Packaging chosen).
I have created a server side procedure:
Create Procedure getmycost
@.size int,
@.packaging varchar(50),
@.cost money OUT
AS
Select @.cost=Cost
From Cost
Where
Size = @.size AND
Packaging = @.packaging
I have placed the this code on the client side within Cost the field:
declare @.size int, @.packaging varchar(50), @.cost money
set @.size=Size
set @.packaging=Packaging
Execute getmynumber @.size,@.packaging,@.cost OUT
select @.cost
I am sure I am doing this all wrong;
I am geting an error:
Invalid column name 'Size'
Is this not the way to reference a field on the web form (Size)?
And will this even work?Hi
Did you check out the links in your previous post?
John
"HollyylloH" wrote:
> Okay, I am new to this so be gental.
> I have a form with 2 drop down menus and a text field that I am concerned
> with. Size, Packaging, and Cost. Size and Packaging pull their info from a
> Size and a Packaging table respectively. I need the third field, Cost, to
> take the values selected by the user in the Size and Packaging fields, and
> use those values to query a third table "Cost." The Cost Table has three
> fields: Size, Packaging, and Cost (The cost field is always different
> depending on the Size and Packaging chosen).
> I have created a server side procedure:
> Create Procedure getmycost
> @.size int,
> @.packaging varchar(50),
> @.cost money OUT
> AS
> Select @.cost=Cost
> From Cost
> Where
> Size = @.size AND
> Packaging = @.packaging
> I have placed the this code on the client side within Cost the field:
> declare @.size int, @.packaging varchar(50), @.cost money
> set @.size=Size
> set @.packaging=Packaging
> Execute getmynumber @.size,@.packaging,@.cost OUT
> select @.cost
> I am sure I am doing this all wrong;
> I am geting an error:
> Invalid column name 'Size'
> Is this not the way to reference a field on the web form (Size)?
> And will this even work?
>|||Yes I did check them out. No I can't answer my question from them.
"John Bell" wrote:
> Hi
> Did you check out the links in your previous post?
> John
> "HollyylloH" wrote:
>
Monday, March 19, 2012
Asking
SELECT * INTO TD in 'C:' [Text;]
From TS
Now, Can SQL Server 2000 do like this? IF can, How is its syntax?Bpk,
Here is an example to work with:
EXEC master..xp_cmdshell 'osql -E -dPubs -Q"select * from
authors" -o"C:\authors.txt"'
You can also use BCP (out) and DTS.
HTH
Jerry
"Bpk. Adi Wira Kusuma" <adi_wira_kusuma@.yahoo.com.sg> wrote in message
news:ulzUGe2xFHA.2652@.TK2MSFTNGP14.phx.gbl...
> At Ms Access, I can export data to text or excel with only to write:
> SELECT * INTO TD in 'C:' [Text;]
> From TS
> Now, Can SQL Server 2000 do like this? IF can, How is its syntax?
>|||This will work for the publisher table in the Pubs DB
exec master..xp_cmdshell 'bcp pubs.dbo.publishers out "c:\files.txt" -S
{YourServerNameHere} -T -t "," -c'
or just from the command line bcp pubs.dbo.publishers out "c:\files.txt" -S
{YourServerNameHere} -T -t "," -c
http://sqlservercode.blogspot.com/
"Bpk. Adi Wira Kusuma" wrote:
> At Ms Access, I can export data to text or excel with only to write:
> SELECT * INTO TD in 'C:' [Text;]
> From TS
> Now, Can SQL Server 2000 do like this? IF can, How is its syntax?
>
>
Ascii Code search
I'm tring to create a sql query in 6.5 that will find any unprintable
characters in a text field. I'm trying to use a where clause that looks
for specific ASCII codes but cant seem to get it work. Does anyone have
any ideas how to do this.
Thanks
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
David,
You can use below technique. In my example, I used CHAR(99) which is the letter 'c'. Replace this with the
ASCII code for the unprintable character you want to find.
SELECT *
FROM
(
SELECT 'abcdef' AS colname
UNION
SELECT 'abdef' AS colname
) AS d
WHERE CHARINDEX(CHAR(99), colname) > 0
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Cervelli" <cervelli@.adelphia.net> wrote in message news:OkpMIugiEHA.1348@.tk2msftngp13.phx.gbl...
> Hi;
> I'm tring to create a sql query in 6.5 that will find any unprintable
> characters in a text field. I'm trying to use a where clause that looks
> for specific ASCII codes but cant seem to get it work. Does anyone have
> any ideas how to do this.
> Thanks
>
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
|||Tibor
I finally tried this and it works great but I have a few issues that I
hope you might be able to help.
I'm using version 6.5 so a varchar is only 255 characters.
I'm trying to search a text field that is much larger then 255.
Your soltuion does a good job at searching a text field but not a text
field.
If I convert the text to varchar it only looks at the first 255
characters.
Do you have any suggestions?
Thanks in advance.
David
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||If the function doesn't support the "text" datatype, then you probably have to use functions such as
TEXTPTR, READTEXT etc to loop through your data and use the function on chunks of data. Not very
fun...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Cervelli" <dcervelli@.ssgnet.com> wrote in message
news:uRwc0zXkEHA.3632@.TK2MSFTNGP09.phx.gbl...
>
> Tibor
> I finally tried this and it works great but I have a few issues that I
> hope you might be able to help.
> I'm using version 6.5 so a varchar is only 255 characters.
> I'm trying to search a text field that is much larger then 255.
> Your soltuion does a good job at searching a text field but not a text
> field.
> If I convert the text to varchar it only looks at the first 255
> characters.
> Do you have any suggestions?
> Thanks in advance.
> David
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
Ascii Code search
I'm tring to create a sql query in 6.5 that will find any unprintable
characters in a text field. I'm trying to use a where clause that looks
for specific ASCII codes but cant seem to get it work. Does anyone have
any ideas how to do this.
Thanks
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!David,
You can use below technique. In my example, I used CHAR(99) which is the let
ter 'c'. Replace this with the
ASCII code for the unprintable character you want to find.
SELECT *
FROM
(
SELECT 'abcdef' AS colname
UNION
SELECT 'abdef' AS colname
) AS d
WHERE CHARINDEX(CHAR(99), colname) > 0
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Cervelli" <cervelli@.adelphia.net> wrote in message news:OkpMIugiEHA.1348@.tk2msftngp13
.phx.gbl...
> Hi;
> I'm tring to create a sql query in 6.5 that will find any unprintable
> characters in a text field. I'm trying to use a where clause that looks
> for specific ASCII codes but cant seem to get it work. Does anyone have
> any ideas how to do this.
> Thanks
>
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!|||Tibor
I finally tried this and it works great but I have a few issues that I
hope you might be able to help.
I'm using version 6.5 so a varchar is only 255 characters.
I'm trying to search a text field that is much larger then 255.
Your soltuion does a good job at searching a text field but not a text
field.
If I convert the text to varchar it only looks at the first 255
characters.
Do you have any suggestions?
Thanks in advance.
David
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!|||If the function doesn't support the "text" datatype, then you probably have
to use functions such as
TEXTPTR, READTEXT etc to loop through your data and use the function on chun
ks of data. Not very
fun...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Cervelli" <dcervelli@.ssgnet.com> wrote in message
news:uRwc0zXkEHA.3632@.TK2MSFTNGP09.phx.gbl...
>
> Tibor
> I finally tried this and it works great but I have a few issues that I
> hope you might be able to help.
> I'm using version 6.5 so a varchar is only 255 characters.
> I'm trying to search a text field that is much larger then 255.
> Your soltuion does a good job at searching a text field but not a text
> field.
> If I convert the text to varchar it only looks at the first 255
> characters.
> Do you have any suggestions?
> Thanks in advance.
> David
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
Ascii Code search
I'm tring to create a sql query in 6.5 that will find any unprintable
characters in a text field. I'm trying to use a where clause that looks
for specific ASCII codes but cant seem to get it work. Does anyone have
any ideas how to do this.
Thanks
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!David,
You can use below technique. In my example, I used CHAR(99) which is the letter 'c'. Replace this with the
ASCII code for the unprintable character you want to find.
SELECT *
FROM
(
SELECT 'abcdef' AS colname
UNION
SELECT 'abdef' AS colname
) AS d
WHERE CHARINDEX(CHAR(99), colname) > 0
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Cervelli" <cervelli@.adelphia.net> wrote in message news:OkpMIugiEHA.1348@.tk2msftngp13.phx.gbl...
> Hi;
> I'm tring to create a sql query in 6.5 that will find any unprintable
> characters in a text field. I'm trying to use a where clause that looks
> for specific ASCII codes but cant seem to get it work. Does anyone have
> any ideas how to do this.
> Thanks
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
Wednesday, March 7, 2012
As tables grow, how to make text beside table stay fixed on a page
Thanks,
Mike DeardorffAnything that starts below the table will get pushed down as the table
grows.
The easiest way to prevent this is to move the textbox.
The second easiest way is to put the textbox (and potentially other items
beside the table) into a rectangle which starts before the bottom of the
table.
--
This post is provided 'AS IS' with no warranties, and confers no rights. All
rights reserved. Some assembly required. Batteries not included. Your
mileage may vary. Objects in mirror may be closer than they appear. No user
serviceable parts inside. Opening cover voids warranty. Keep out of reach of
children under 3.
"MDeardorff" <MDeardorff@.discussions.microsoft.com> wrote in message
news:2AFFC019-A5BD-463B-B4C3-A7B8CDBC4D42@.microsoft.com...
> I have a table on the left hand side of a page and some fixed text on the
right hand side of the page. Unfortunately, as the table grows, the text on
the right hand side of the page is forced down the page. How can I keep the
text fixed at a particular point on a page, no matter the size of the table
on the left?
> Thanks,
> Mike Deardorff
Thursday, February 9, 2012
Are text pages deleted when a column is converted to varchar
design view of a table within Enterprise Manager the
varchar value (less than 8000 characters) appears in the
column but does SQL Server automatically delete the text
values from their pages?
If not are they removed by routine reindex/defrag or
should I create a new table, import from the text as
varchar and drop the old table to make sure the pages
storing the original text version of the values are
deleted?
..morriszone@.hotmail.com (Steve Morris) wrote in message news:<757b6d8f.0404080820.7956cf62@.posting.google.com>...
> When I change a column from text to varchar using the
> design view of a table within Enterprise Manager the
> varchar value (less than 8000 characters) appears in the
> column but does SQL Server automatically delete the text
> values from their pages?
> If not are they removed by routine reindex/defrag or
> should I create a new table, import from the text as
> varchar and drop the old table to make sure the pages
> storing the original text version of the values are
> deleted?
> .
just try:
select * into your_table_bak from your_table
and then try your alter table statment with no risk of dataloss!
alter table *your_table_bak* :-)
if you dont like to read 8000 charakter to find out wether some data
is loss or not try the function
"getsize"
hth