logo       

Re: Blob errors (illegal character)...: msg#00144

Subject: Re: Blob errors (illegal character)...
> Can you show part of code you're using?
        string content;
         StreamReader file = new StreamReader(txtPhoto.Text);
         content = file.ReadToEnd();
         content = content.Replace("'", "''");
        photo = content;

I had been escaping \ with this:
content = content.Replace("\\","\\\\");
but that does absolutely nothing. If I remember correctly its not an 
escape character, should I use the Ascii_Char(n) for special objects 
such as carriage returns and what have you?

this is the actual insert code

        dbCnxn.execOpen();
         string insert = "INSERT INTO members (CODE_MEMBER, ID_FAMILY, 
FNAME, SNAME, FLNAME, SLNAME, BIRTHDATE, GENDER, CELL_PHONE, WORK_PHONE, 
ALT_PHONE, EMAIL, NIT, PROFESSION, JOB, JOB_POSITION, PHOTO) VALUES ( '" 
+ Core.Config.AppSet.Default.code + "', " + family + ",'" + fname + 
"','" + sname + "','" + flname + "','" + slname + "','" + birthdate + 
"','" + gender + "', " + phone2 + ", " + phone3 + "," + phone4 + ",'" + 
email + "','" + nit + "','" + profession + "','" + job + "','" + 
position + "'";
        //Just in case some no essential information is empty
         insert = insert.Replace("''", "null");
         insert = insert + ", '" + photo + "')";
         int b = dbCnxn.sqlExecute(insert);
        dbCnxn.execClose();


        dbCnxn belongs to class I created to handle all the calls to dotnet 
provider all that method does is adds the previously opened conectiona 
and transaction to the command and calls the ExecuteNonQuery() method

this enough info or need some more?

James



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe