Solved

Call to SQL-database from ASP

Posted on 1998-09-11
5
187 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 60 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how the fundamental information of how to create a table.

776 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