Solved

Call to SQL-database from ASP

Posted on 1998-09-11
5
185 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
Comment Utility
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
Comment Utility
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 60 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
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 and will be exposed to the many uses the SELECT statement has.

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now