Solved

Call to SQL-database from ASP

Posted on 1998-09-11
5
190 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
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

707 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