Solved

Varchar(500)

Posted on 2014-10-20
6
20 Views
Last Modified: 2016-06-15
Dear Experts,

Please advise me.

Basically, this is a registration form. My Developer has set varchar(500) on the text field.
However, recently we realised that the number of character is more then 500. Hence, is there any way that i can retrieve the "DROP" data/packets ?

Currently, the data is store in Mysql which happens to be on the CPanel...
0
Comment
Question by:sky guo
6 Comments
 
LVL 65

Accepted Solution

by:
Jim Horn earned 250 total points
ID: 40392668
>is there any way that i can retrieve the "DROP" data/packets ?
Explain what you mean by "DROP" data/packets.

If rows were instered that had a value in this column greater than 500, then the data was likely truncated at the 500th character, and there is no way to retrieve the 501st character onwards that was truncated.

btw if whatever code that INSERTS data has a SET ANSI_WARNINGS OFF line before it, then any truncation will happen without throwing a message/error, meaning you'd never know when this happens.  Setting SET ANSI_WARNINGS ON would throw the error.   Best practice is to leave it on to insure that all characters are inserted, and give the developer notice if the column is not big enough to handle source data.

>Basically, this is a registration form. My Developer has set varchar(500) on the text field.
I'd question how this data is being stored, but that's an issue for another question.
0
 

Author Comment

by:sky guo
ID: 40394217
So for this case,

are we able to retrieve the files from innodb? or myisam?
0
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 total points
ID: 40394268
No, if the data was truncated when it was inserted, it is already lost.  You would need to go back to the original data set and recreate the tables with a longer VARCHAR() value.
0
 
LVL 65

Expert Comment

by:Jim Horn
ID: 40394759
Just to keep the question moving along, please show us the T-SQL code / SSIS package screenshot that inserts data into this column.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 40395297
I suspect the author has inadvertently included the MS SQL Server topic area.  Since the question does not appear to have anything to do with SQL Server it probably should be dropped.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Creating and Managing Databases with phpMyAdmin in cPanel.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

911 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now