ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 24th, 2009, 07:04 PM
sdpetersen sdpetersen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2009
Posts: 2 sdpetersen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 36 m 46 sec
Reputation Power: 0
ASP 1.0 - Data lost while using ASP to update MySQL TEXT field

Hi, new to the forums here, but I use them as reference all the time. I've searched the internet for similar problems and can't find any questions that seem to relate to mine.

I'm not sure how to explain this problem I am having, but I will try nonetheless.

I am currently using ASP to update a TEXT field in a MySQL database on a GoDaddy shared server (This is my first MySQL project). The TEXT field is mixed within VARCHAR, INT and DATETIME type fields that do not have the same problem.

What happens is when I try to update the field using code similar to what is seen below it doesn't save the data, just a bunch of random characters and unreadable text.

Code:
DB("Article") = Request.Form("article_text")
DB.update


Here's what's blowing my mind: It works fine on my computer running Localhost, it works fine when I put the page on the GoDaddy server, it's just when I put it on our main third-party server that it has this problem.

All other data types update just fine. There is no error code given. The page can request the data from MySQL database and display it with no problems, it just can't update it.

Here's an example of my connection:
Code:
Set Connection = Server.CreateObject("ADODB.Connection")
DriverLoc = "DRIVER={MySQL ODBC 5.1 Driver}; SERVER=MYSERVER; PORT=3306; DATABASE=MYDATABASE; UID=MYID; PASSWORD=MYPASSWORD; OPTION=3"
Connection.Open DriverLoc
Set DB = Server.CreateObject("ADODB.Recordset")
SQL = "SELECT * FROM Articles"
DBData.Open SQL, DriverLoc


Unfortunately I do not have access to any files or settings for MySQL or Localhost on the third party server.

Is there anything that anyone can suggest here?

Reply With Quote
  #2  
Old December 5th, 2009, 12:57 AM
joshuezzes joshuezzes is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2009
Location: US
Posts: 1 joshuezzes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 56 sec
Reputation Power: 0
Send a message via ICQ to joshuezzes
Message

Reply With Quote
  #3  
Old December 5th, 2009, 09:21 AM
NextLevel NextLevel is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2009
Posts: 2 NextLevel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 23 sec
Reputation Power: 0
I ran into the same problem today. Obviously you have to set the cursor to clientside otherwise text type field are not updated.


I still use VB6 where it looks like this

Connection.CursorLocation = adUseClient
or
Connection.CursorLocation = 3


I think it's still the same in .NET

Reply With Quote
  #4  
Old December 7th, 2009, 12:01 PM
sdpetersen sdpetersen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2009
Posts: 2 sdpetersen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 36 m 46 sec
Reputation Power: 0
Thanks!

How about that, something so simple. I guess that's the problem with being a self-taught programmer - you don't know about the obvious.

BTW, the syntax is the same:
Code:
.CursorLocation = 3

Reply With Quote
  #5  
Old December 8th, 2009, 01:28 PM
NextLevel NextLevel is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2009
Posts: 2 NextLevel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 23 sec
Reputation Power: 0
Maybe this article will light you up as it does to me

dev.mysql.com/tech-resources/articles/vb-cursors-and-locks.html

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > ASP 1.0 - Data lost while using ASP to update MySQL TEXT field


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap