Thread: nonprintable characters in the databse, when insert data

  1. #1
    Registered User
    Join Date
    Apr 2017
    Posts
    51

    nonprintable characters in the databse, when insert data

    I have a problem. I have a structure with many elements.
    I have an array ab[5]. I have to update database field, even array is empty, but I wan to make it NULL
    Code:
    memset(ab,"\0,sizeof(ab));
    
    or
    
    ab[0] = "\0"
    noting help, I see in the database some nonprintable characters, like:
    Code:
    ÔÔÔÔÔ
    how can I put NULL or blank?

  2. #2
    Banned
    Join Date
    Aug 2017
    Posts
    861
    try
    Code:
    memset(&arr[0], 0, sizeof(arr));
    loop through it setting each element to null or 0 ,zero for int arrays
    Last edited by userxbw; 10-13-2017 at 02:01 PM.

  3. #3
    Registered User
    Join Date
    Apr 2017
    Posts
    51
    It works, thanks

  4. #4
    Banned
    Join Date
    Aug 2017
    Posts
    861
    Quote Originally Posted by digioleg54 View Post
    It works, thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Insert struct data to bst node
    By Vsky in forum C++ Programming
    Replies: 13
    Last Post: 01-03-2016, 05:37 AM
  2. how to insert data in a map container
    By roelof in forum C++ Programming
    Replies: 40
    Last Post: 06-13-2010, 12:34 AM
  3. top ten values while I insert data
    By kopros in forum C Programming
    Replies: 10
    Last Post: 12-18-2006, 08:13 AM
  4. Replies: 8
    Last Post: 10-17-2005, 07:01 PM
  5. Replies: 4
    Last Post: 10-14-2005, 12:53 PM

Tags for this Thread