Showing posts with label display. Show all posts
Showing posts with label display. Show all posts

Sunday, March 25, 2012

ASP, SQL, long text data problems...

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?

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 script to display database structure?

Posted this to SQLServer.Tools, but maybe it belongs here...
Does anyone have an ASP script that I can use to dump the structure of an MS
SQL 2000 database?
The firewall here won't allow any remote connections through, and our DB
host does not have any web administration.
I just need the table names, field names, and field data types.
Thx!would information_schema.tables and information_schema.columns do?
Just join the views and select the columns you need.
SELECT *
FROM information_schema.tables t
JOIN information_schema.columns c
ON t.table_schema = c.table_schema
AND t.table_name = c.table_name
"Noozer" wrote:

> Posted this to SQLServer.Tools, but maybe it belongs here...
>
> Does anyone have an ASP script that I can use to dump the structure of an
MS
> SQL 2000 database?
> The firewall here won't allow any remote connections through, and our DB
> host does not have any web administration.
> I just need the table names, field names, and field data types.
> Thx!
>
>|||Thanks!
That did the trick!
"Nigel Rivett" <NigelRivett@.discussions.microsoft.com> wrote in message
news:46273214-5138-4D9F-A0EB-7C1AC0B70344@.microsoft.com...
> would information_schema.tables and information_schema.columns do?
> Just join the views and select the columns you need.
> SELECT *
> FROM information_schema.tables t
> JOIN information_schema.columns c
> ON t.table_schema = c.table_schema
> AND t.table_name = c.table_name

ASP only shows fields which contain numeric data

Hi

I'm using an SQL server database to run a website with ASP.

A new page I'm making will only display the contents on fields containing numeric data and it won't display text.

Other pages work fine. Does anyone have any ideas as to why this is happening - I've never seen in before.

Dave

http://pink-football.com/gossip.aspCould you use one of your ASP variables to be use with a number operator? like "+" or sumthin?

or

How are you calling your SQL server scripts? Through inline with your ASP codes or trough store procedures.

In either case, check your passing of ASP variable into your SQL Script.
Maybe you could miss a '' character.

What is the actual ASP error msg??|||Is it an error or just no data is returned ? Is your query returning both numerics and string data and only the numeric data is showing ? Have you tried to do a response.write to display all fields being returned ? Is it possible that you have single quotes in your string data ? On your web site - what are we looking for - and boy is it pink !!!

ASP Data Grid Needed

I need to display data from a sql server 2000 db on an asp web page and I need a vertical split. Does anyone have any solutions? I really can't afford to spend much/any money so freeware/shareware or coding suggestions is what I am interested in.
Thanks!What do you mean by vertical split?

Did you try GotDotNet.com?

Sorry im windows not much with asp|||Would TrueDBGrid do it for you?sql

Tuesday, March 20, 2012

asp > asp.net

I'm in the process of trying to learn asp.net and one of the things I'd like to tackle right off the bat is a simple display from my SQL server. Below is some of my "classic" asp that works fine. I suppose what I want to know is, what would this code look like in .net?

<%

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open Application("inet_dvdauthority")
sql = "SELECT * FROM contest_text where dte = '3/14/2004' order by id"

Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open sql, Conn, adOpenStatic, adLockReadOnly, adCmdText

%
<p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr><td class="reviewheader" colspan="2">dvd/authority contest - week of <%=RS("dte")%><br><br></td>
</tr>
<%
If RS.EOF Then
%>
<tr>
<td>No Contest found.</td>
</tr>
<%
Else
%>
<%
Do Until RS.EOF
%>
<tr>
<td width="110" valign="top" align="center" class="afitext"><img src="http://pics.10026.com/?src=/dvds/<%=RS("image")%>" border="1" width="100" height="140" alt="<%=RS("title")%>"><Br><%=RS("title")%><br><br></td>
<td valign="top" class="maintext"><p align="justify"><%=RS("body")%></p></td>
</tr>
<%
RS.MoveNext
Loop
End If
%>
</table>
</p
<%

Set RS = Nothing
Conn.Close
Set Conn = Nothing

%>Google for info on using a SQLDataReader to populate a repeater. That should give you what you need to do this in dotnet

Monday, February 13, 2012

Arithmetic operator

I'm using Sql Server reporting tools and creating a report.
How can I display the difference of two fields on a report?

you have 3 text boxes on a form..

say you have two fields...

textbox1.value = fields!myfield1.value

textbox2.value = fields!myfield2.value

then in the value for textbox3 put

= fields!myfield1.value - fields!myfield2.value

QED

Daryl