Solved

Call to SQL-database from ASP

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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

734 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