473,698 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP returning null sized field from MS SQL database

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?

Cheers
Grant
Jul 20 '05 #1
1 1574
Grant Davis (gr***@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, es****@sommarsk og.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
14732
by: Jamie Burns | last post by:
Hello, I am trying to perform a LEFT JOIN on a table which may or may not have matching rows. If there are no matching rows, it returns NULL's for all the missing fields. Is there anyway of returning the default values for that table instead of NULL's, in a portable way?
5
3095
by: Gent | last post by:
I have two questions which are very similar: Is it possible to return an object in C++. Below is part of my code for reference however I am more concerned about the concept. It seems like the function below is returning a pointer to pointers who are GUID. I am trying to write a wrapper to use in my VB code and what I would prefer to do is be able to return an array of GUID. I remember (not sure) that the concept of arrays does not really...
12
1871
by: Jeff North | last post by:
I'm stumped and my brains are fried!!!! I have the following data +-------+------------------------------+------------+ | resID | FLEName | VersionNbr | +-------+------------------------------+------------+ | 1 | 35_laserdatandria2104.zip | 1.0 | | 2 | 35_laserdatandria2104.zip | 1.23 | | 3 | 35_microweb1.31.zip | 1.0 | | 4 | 35_microweb1.31.zip | 1.234 |
10
3164
by: Pete | last post by:
Can someone please help, I'm trying to pass an array to a function, do some operation on that array, then return it for further use. The errors I am getting for the following code are, differences in levels of indirection, so I feel it must have something to do with the way I am representing the array in the call and the return. Below I have commented the problem parts. Thanks in advance for any help offered. Pete
7
40026
by: Dan | last post by:
I'm fairly new to C# and I am having some problems understanding int variables and null values. I have created a class that populates the values of it's fields from a DataReader in it's constructor. Those fields are modified during various methods in the class. One method updates the database with the values of the class fields. I have everything working fine for string fields but am running into problems with integers and null values.
1
4006
by: John Chorlton | last post by:
I've been attempting to pass a chunk of data back from a child Windows form using public properties on the form and have been getting some odd errors. I wanted to return a row of data to avoid creating many public properties on the form to do the same thing. At first I tried returning a DataViewRow. This worked fine until I reached the phone field on the parent table and the code Child form public DataRowView SelectedAddres ge ...
2
19603
by: Brett | last post by:
My database has 2 tables: Table1 & Table2. If a field is not null on a record in table2, then the not null fields in table1 that correspond to the records in table1 needs to be updated to match the field in table2. What I have is a form that is linked to Table2. If the users want to change a field in the main database (table1), they fill the change in to the form (which is linked to table2) If there is no change to the field, they simply...
7
4615
by: Joey Sabey | last post by:
Hey, I've got a bit of a strange problem caused by a situation I'm in. I'm writing a DLL for a friend of mine in C++, and he plans to use it in delphi. The DLL needs to return strings, and we doubt that a string would return well to a delphi program, so the only thing I could think of was returning a char*, which obviously would be very dangerous as the array would be being declared as a local variable and would only be returning it's...
10
2195
klarae99
by: klarae99 | last post by:
I am working on an Inventory Database in Access 2003. I am having trouble with a report I designed to show current inventory in stock. I have a form (frmInventory) that is unbound. There are four combo boxes on this form that allow the user to select Location, Vendor, Category and SubCategory. These selections (or blank fields) are then passed on to a query (see SQL below) and a report opens to show the inventory. This worked really well...
0
8671
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8598
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8856
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6515
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5858
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
1997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.