?
Solved

Call to SQL-database from ASP

Posted on 1998-09-11
5
Medium Priority
?
194 Views
Last Modified: 2012-05-04
What is the diffrence in th order I type my filed names when calling the SQL database?

f.i. "SELECT name,ename,phone,text FROM ..."
and  "SELECT phone,text,ename,name FROM ..."

and calling them one by one...
Since that is the only way for me to get to the binary field s. All other i can get in the same string...
0
Comment
Question by:aspdev
  • 3
  • 2
5 Comments
 
LVL 28

Expert Comment

by:sybe
ID: 1089995
ASP/ODBC has a problem with retrieving the content from SQL text (and binary ?) fields. All fields in the select statement that are mentioned after the "text" field won't be retrieved.

0
 

Author Comment

by:aspdev
ID: 1089996
Ic. Is there any other workaround for this except calling the textfields by them selves?

On another ASP page, I call the same database, some other field but also the text field. And I don't have it place in the end of my call. The thing is that on that cal, I DONT get anny error calls...

Will it help to install IIS4 and SQL server 6.5?


0
 
LVL 28

Accepted Solution

by:
sybe earned 180 total points
ID: 1089997
To avoid the problem with SQL text and binary fields, you can use "SELECT * FROM...", this will get all fields correctly.

And you can't define the recordset with:
Set RS = Conn.Execute(strSQL)

You'll have to use:

Set RS = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM..."
RS.Open strSQL, Conn, 1, 1
0
 
LVL 28

Expert Comment

by:sybe
ID: 1089998
Oh, yes, that works ok with IIS3 and SQL 6.5. An upgrade to IIS4 is not needed, but I don't know about upgrading to DQL 6.5, because I have never tried it with a lower version.

Upgrading to IIS4 will upgrade to ASP2.0, and give ASP some more power/possibilities.

0
 

Author Comment

by:aspdev
ID: 1089999
With your suggestion "SELECT * FROM.." it worked fine. I don't really understand what you mean about how I call the database since I get t to work (though, I have made a connection in global.asa) anyway, I got it to work now. and I guess we'll just have to wait for a new version of ASP or SQL before evrything will work smoothly.

Thanx for answering!

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question