-
returning an inproper value when using DSN
[Originally posted by Paul Rovers]
normally I do not use dsn, this time I had to because I'm using dbf file instead of a mdb file
the asp in this message is working but
the output on the page is
˙
˙ name : test person
˙ contact1 :
˙ contact2 :
in the database the name field is specified as text and the contact fields as memo
the contact fields in the database need to stay a memo field
what can I do to make it work ?˙ what is wrong ?
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DSN=DBF;Uid=username;Pwd=password;"
Set RS = Server.CreateObject("ADODB.RecordSet")
sql = "SELECT * FROM all2"
RS.Open SQL, Conn,1,1
if RS.BOF And RS.EOF then
this database is empty
else
if RS("name") <> "" then
naam : =RS("name")
end if
if RS("contact1") <> "" then
contact1 : =RS("contact1")
end if
if RS("contact2") <> "" then
contact2 : =RS("contact2")
end if
end if
RS.Close
Conn.Close
Set RS = Nothing
Set Conn = nothing
I'm dutch so do not mind all write mistakes :)
-
Re:returning an inproper value when using DSN
[Originally posted by FreeVBCode.com]
I don't know why are getting those characters, but you can remove them.˙ There is a routine on this site that trims all non-printing characters from a string, see <A HREF = 'http://www.freevbcode.com/ShowCode.ASP?ID=104'>http://www.freevbcode.com/ShowCode.ASP?ID=104</A>. It's for VB but it should be easy to adapt for ASP; just remove the type declarations.
-
Re:Re:returning an inproper value when using DSN
[Originally posted by Paul Rovers]
the problem is that those values are the most important in my database without that information the database is useless.
I think it's the server administrator who has made a mistake but I do not know what the problem is because I do not get a fault message
maybe there's a script that can check what is wrong with the server or something
atleast I hope so
-
Re:Re:Re:returning an inproper value when using DSN
[Originally posted by FreeVBCode.com]
I'm sorry, I did not look closely enough at your original message.˙ You are getting junk instead of the actual contact information, correct?
All I can say is that your ASP looks fine and that you need to check the˙ .dbf itself if the values are there and if the .dbf's tables are correctly configured.˙ Maybe you can set up a linked access table.˙ Sorry I can't help you further.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks