Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

how to Blob_to_char ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    how to Blob_to_char ?

    From the help
    dim ch as C
    dim chb as B
    ch = "Rosemary"
    chb = char_to_blob(ch)
    chb -> Rosemary
    But how should the reverse be done

    I have been just using the = operator
    but I'm a tad uneasy about that.

    Thanks

    #2
    Re: how to Blob_to_char ?

    Colin,
    Not something that could be depended upon...IOW I would not do it. Think about it. A character field can be 255 characters. A character variable can be 1024 (maybe 1023) characters before becoming a blob. So if you tried to convert a blob that was 255 or under not a problem...but not something I would want to take a chance on unless you are certain of it.


    I guess the question is either why do you want to or what is it that you need to do?
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________



    Comment


      #3
      Re: how to Blob_to_char ?

      <blob>.dump()

      Comment


        #4
        Re: how to Blob_to_char ?

        Hi Colin,

        Originally posted by ColinJD View Post
        But how should the reverse be done
        Just dimension a variable as type C, and set it equal to the blob, as in

        dim tmp as c
        tmp=blob_variable

        Note that the conversion will stop at the 1st null (ascii 0) in the blob, or the length of the blob, whichever comes 1st.
        Regards,

        Ira J. Perlow
        Computer Systems Design


        CSDA A5 Products
        New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
        CSDA Barcode Functions

        CSDA Code Utility
        CSDA Screen Capture


        Comment


          #5
          Re: how to Blob_to_char ?

          Mike
          A character variable can be 1024
          I have searched for the character variable size before, so was unaware,
          Note: I have Dimmed Chars at over 80k before today ! ouch
          Lance
          <blob>.dump()
          will try
          -
          Ira,
          yes simillar to what I have been doing,
          I do experience some corruptions, but I think a decoding is required'

          Comment


            #6
            Re: how to Blob_to_char ?

            Colin,
            I found the 1024 limit when wanting to write the variable's contents to a memo field...as a memo is a blob type of field you would think it to be not a problem. I found that it will take a character variable's value but not a blob variable's. Well, I had to first write to a file and then read the file into the memo as the only work-around I could figure out....but only if the data exceeded the 1024.
            Mike
            __________________________________________
            It is only when we forget all our learning that we begin to know.
            It's not what you look at that matters, it's what you see.
            Henry David Thoreau
            __________________________________________



            Comment


              #7
              Re: how to Blob_to_char ?

              Colin,

              Originally posted by ColinJD View Post
              I have searched for the character variable size before, so was unaware,
              Note: I have Dimmed Chars at over 80k before today ! ouch
              Alpha's character strings can be any length limited by memory. Some functions (not many) are limited to 1024 length limit, and occasionally change these longer strings to blobs, particularly if not dimensioned.

              I've have had strings of 64 megabytes plus in use (not recommended though, as it uses a lot of system memory - set the values to null "" when done so memory is released)
              .....

              Originally posted by ColinJD View Post
              I do experience some corruptions, but I think a decoding is required'
              Long strings of 80k are nothing to Alpha. There should be no "corruptions"
              Regards,

              Ira J. Perlow
              Computer Systems Design


              CSDA A5 Products
              New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
              CSDA Barcode Functions

              CSDA Code Utility
              CSDA Screen Capture


              Comment


                #8
                Re: how to Blob_to_char ?

                Mike,
                Well, I had to first write to a file and then read the file into
                Gosh I have been tempted so often do do something similar, but it just seems wrong.


                Ira
                Long strings of 80k are nothing to Alpha. There should be no "corruptions"
                I have been trying to use for manipulations that stringScanner object, as due to some of its features it would appear that Alpha uses it internally to process the XBASIC code. It has been generally passing longish strings from the GetRemainder() or GetToOffset() that the minor corruptions occur.

                Comment


                  #9
                  Re: how to Blob_to_char ?

                  Originally posted by ColinJD View Post
                  Gosh I have been tempted so often do do something similar, but it just seems wrong.
                  Unless it's something you need stored permanently, it is wrong. This slow's things down and potentially put's more overhead on the network, or usage of the hard drive.

                  Originally posted by ColinJD View Post
                  I have been trying to use for manipulations that stringScanner object, as due to some of its features it would appear that Alpha uses it internally to process the XBASIC code. It has been generally passing longish strings from the GetRemainder() or GetToOffset() that the minor corruptions occur.
                  I've used the stringscanner object a couple of times, and thought it was also used by Alpha, but I've seen no real indicators that it is used in any major way by Alpha.

                  I use regex and many of the simpler A5 string processing functions with no problems. Below is an edited list of the functions I use the most (I have eliminated ones that are specific to my usages such as SIN(), COS(), date conversions and utility oriented to give a better indicator of those used the most. Note that type C and M are used the most (and are faster in general), and type S (Xbasic functions) don't show up as much.

                  Cal Locklin has run similar reports and has similar results. The utility that produces this information (for 1 or more code pieces) will be in the next version of my CSDA Code Utility and provides good info as to those that should be improved for speed and references to non-existent functions (generally typos)

                  Code:
                  Process Time: 435 seconds
                  Processed: 1018 code entries
                  Processed: 
                  
                  Used: 78544 functions
                  Unique: 3027 unique functions
                  Counts | Types
                  =======|=================
                     254 | I - Internal Functions 
                     179 | D - Database code 
                     161 | M - Methods 
                     329 | C - 'C' code 
                     368 | S - System AEX 'XBasic' code 
                       3 | A - Addin AEX 'XBasic' code 
                    1756 |   - Unknown code
                  
                  Count,Type,Code Name,Prototype,Description
                  ==============================================
                    4482,C,Crlf(),C CRLF([N count]),Returns cr-lf(s).
                    3490,C,Word(),C WORD(C character,N word_number[,C separator[,N num_words]]),Returns a specified word(s) from a string.
                    2875,C,Ut(),C UT(C character),Returns the uppercase trimmed version of the string supplied.
                    2802,C,Chr(),C CHR(N ascii_value),Converts a numeric expression to a character expression.
                    2739,C,Str(),C STR(N number[,N length[,N decimal_places[,C number_format]]]),Converts a number to a character string.
                    2711,C,Alltrim(),C ALLTRIM(C character),Trims leading and trailing spaces.
                    2636,C,Typeof(),C TYPEOF(A value),Returns the data type of the the value.
                    2632,C,Ltrim(),C LTRIM(C character[,C other_chars]),Removes any leading blanks (or optional other characters) in a character string.
                    2227,C,If(),A IF(L condition,A result_true,A result_false),Tests an expression and returns one of two expressions.
                    2016,C,Eval(),C EVAL(C Expression[,C eval_context[,C eval_cursorstate]]),Return the result of the expression (parses an expression stored in a string, and evaluates it).
                    1813,C,Substr(),C SUBSTR(C character,N starting_position[,N number_of_characters]),Returns a substring portion of a character string.
                    1798,C,Trim(),C TRIM(C character),Removes trailing blanks from a character string.
                    1517,C,Left(),C LEFT(C text,N Number_of_characters),Returns a portion of a string, starting with the leftmost character.
                    1395,M,File.Filename_Parse(),  FILE.Filename_Parse(C Filename,C Component),Returns the component(s) of the filename in the order specified (D=drive,P=Path,N=Name,E=Extension).
                    1303,C,Upper(),C UPPER(C character),Converts a character string to uppercase.
                    1221,C,Len(),N LEN(C character),Returns the number of characters in a string.
                    1153,C,Val(),N VAL(C character),Converts a character string to a numeric value.
                    1113,C,At(),N AT(C search_string,C string[,N occurrence]),Returns the position where one character string is found in another.
                     993,C,*Concat(),,
                     691,C,Ui_Msg_Box(),N UI_MSG_BOX(C title,C message[,N box_style]),Inform user with a message box.
                     559,C,Abs(),N ABS(N number),Returns the absolute value of a number.
                     557,M,File.Exists(),  FILE.Exists(C filename),Does file exist.
                     525,C,Evaluate_Template(),C EVALUATE_TEMPLATE(C template[,C Macro1[,...C MacroN]]),Evaluate code with optional macros.
                     524,C,Local_Variables(),P LOCAL_VARIABLES(),Gets the local variable frame, used to pass local script variables down to other functions.
                     505,C,*For_Each(),C *FOR_EACH(A tag,A each,C list),Executes the command specified by "each" on every entry in a crlf delimited "list". "Tag" refers to each entry in the "list".
                     481,C,Right(),C RIGHT(C,N number_of_characters),Returns a portion of a string starting with the rightmost character.
                     479,C,Now(),T NOW([L gmt_time]),Return time as type 'Time'.
                     474,C,Strtran(),C STRTRAN(C character,C substring,[C replacement,[N start_pos,[N occurrences[,N every]]]]),Replaces each occurrence of a string with another.
                     406,C,Mod(),N MOD(N numerator,N denominator),Returns the integer remainder of one number divided by another.
                     393,C,W_Count(),N W_COUNT(C character[,C separator]),Counts number of words in a character string.
                     390,C,Max(),N MAX(N number_1,N number_2),Returns the larger of two numbers.
                     377,M,A5.Get_Master_Path(),  A5.Get_Master_Path(),Returns the path of the Master database, or null if current database is not Network Optimized.
                     354,C,Int(),N INT(N number),Returns the integer part of a number.
                     348,C,Wordat(),N WORDAT(C word,C string[,C separator]),Returns which word matches (1 based,0 means no match).
                     344,M,Statusbar.Set_Text(),  STATUSBAR.Set_Text(C text),Set the status bar text.
                     310,M,A5.Get_Name(),  A5.Get_Name(),Returns the filename of the current database (.adb file).
                     295,C,Remspecial(),C REMSPECIAL(C),Strips all non-alphabetic and non-numeric characters and spaces from a string.
                     293,M,Table.Current(),  TABLE.Current([N slot]),Returns the current table.
                     289,C,Min(),N MIN(N number_1,N number_2),Returns the lesser of two numbers.
                     284,M,A5.Get_Master_Name(),  A5.Get_Master_Name(),Returns the Master database, or null if current database is not Network Optimized.
                     276,C,Version(),C VERSION([C format]),Returns product information on the current version.
                     274,C,Stritran(),C STRITRAN(C character,C substring,[C replacement,[N start_pos,[N occurrences[,N every]]]]),Replaces each occurrence of a string with another - compare is case insensitive.
                     270,C,Ui_Modeless_Dlg_Close(),V UI_MODELESS_DLG_CLOSE(C title),Close an named modeless dialog box.
                     264,C,Between(),L BETWEEN(A expr_1,A expr_2,A expr_3),Returns TRUE if the 1st expr is between the 2nd and 3rd expr, inclusive.
                     257,C,Lookupc(),C LOOKUPC(C matchtype,A keyvalue,C result_expression,C tablename,C tagname),Returns the value of a character expression in an external table.
                     253,C,Padl(),C PADL(C,N length,C pad_string),Pads the left side of a string with another string.
                     251,S,Hex_To_Dec(),* hex_to_dec(C hex_value [,C return_type ]),
                     245,S,Line_Count(),N line_count(C text ),Counts the number of lines in a CRLF delimited string
                     241,M,A5.Get_Path(),  A5.Get_Path(),Returns the path of the current database (.adb file).
                     221,C,Asc(),N ASC(C character[,L unsigned]),Returns the ASCII value of a character.
                     219,C,Stuff(),C STUFF(C character,N start_position,N number_of_characters,C insert_string),Alters a string by deleting characters and replacing them with another string.
                     203,C,Ui_Modeless_Dlg_Exist(),L UI_MODELESS_DLG_EXIST(C title),Returns TRUE if named modeless dialog box exists.
                     200,C,Occurs(),N OCCURS(C substring,C character),Returns the number of times one string is found in another.
                     187,M,A5.Get_Exe_Path(),  A5.Get_Exe_Path(),Returns the path in which the main <+PRODUCT_NAME-> executable is stored.
                     178,C,Ui_Dlg_Box(),C UI_DLG_BOX(C title,C dialog_format[,C code]),Generic dialog get - display a dialog, returns button push, plus valus in variables.
                     177,M,Table.Open(),  TABLE.OpenMap(C tablename ,C fieldlist [,N mode [,C alias [,C encryption_key ]]]),Open a table with just the specified fieldnames.
                     176,C,Iif(),A IIF(L condition,A result_true,A result_false),Tests an expression and returns one of two expressions.
                     173,S,Filename_Relative(),C filename_relative(C filename [,C reference_path ]),Converts a filename into a relative filename. If reference_path is blank, assume current database path.
                     172,S,Filename_Absolute(),C filename_absolute(C filename [,C reference_path ]),Converts a relative filename into an absolute filename. If reference_path is blank, assume current database path.
                     170,M,File.Remove(),  FILE.Remove(C file_name),Remove a file.
                     167,C,Ui_Info(),N UI_INFO(N option),Get information about the user interface.
                     158,C,Ui_Modeless_Dlg_Box(),V UI_MODELESS_DLG_BOX(C title,C dialog_format[,C code]),Create a modeless dialog box - optional script to handle button requests is the third argument.
                     152,C,Ui_Get_File(),C UI_GET_FILE(C title,C file_types[,C default_choice[,C exist_flag]]),Prompt user for filename.
                     147,C,Null_Value(),A NULL_VALUE(),Assign a null value to any type.
                     140,S,Get_From_File(),C get_from_file(C filename ), Returns the contents of a file as a text string.
                     132,C,Time(),C TIME([C time_format[,T time]),Returns the current time on the system clock in the fomat 'HH:MM:SS', optional format controls other times, passed in time type can be used in place of the current time.
                     129,C,Obj(),P OBJ(C object_name),Resolves an string into the object it names.
                     120,C,Regex_Grep(),C REGEX_GREP( text as c , RegExp as c , Format as c[,options as c]),Performs a regex grep on text. format takes \0 for all text \N for tagged expression. options same as regex_match with additional options:
                     117,S,Remove_Blank_Lines(),C remove_blank_lines(C text ),Removes blank lines in a CR-LF delimited list
                     117,C,Transform(),C TRANSFORM(A value,C formatting_string),Returns a character string that formats a user defined expression.
                     110,C,Hourglass_Cursor(),V HOURGLASS_CURSOR(L show),Show hourglass cursor, or restore normal cursor.
                     108,M,Addin.Variables(),  ADDIN.Variables([C variable_frame_context]),Returns a pointer to the variables defined at the <name> level - optional flag for 'local,shared and global'.
                     107,C,Sleep(),V SLEEP(N Seconds),Sleep for specified number of seconds.
                     104,C,Error_Script_Get(),C ERROR_SCRIPT_GET([N SESSION]),Report the script that the error occured in.
                     103,M,A5.Get_Private_Path(),  A5.Get_Private_Path(),Returns the current Private path.
                     102,C,Ctod(),D CTOD(C character),Converts a charcter string to a date value.
                     101,C,Replicate(),C REPLICATE(C substring,N repeat_value),Duplicates a character a specified number of times.
                     100,C,Sortsubstr(),C SORTSUBSTR(C string,C delimiter[,C Direction][,C Token type]),Returns a string of sorted tokens from a character string - token type 'N'-numeric 'X'-length.
                      98,C,Eval_Valid(),L EVAL_VALID(C Expression[,C eval_context[,N session]]),Return True if the expression can be parsed (expression is properly formed), session context is optional.
                      95,C,Ui_Dlg_Event(),C UI_DLG_EVENT(C title,C event[,C flags]),Invoke an action event in the named dialog - flags I)mmediate, W)ait for input idle.
                      95,C,Error_Code_Get(),N ERROR_CODE_GET(),Retreive the last error code.
                      93,M,Table.Field_Add(),  TABLE.Field_Add(C Fieldname,C Fieldtype[,N Field_Width[,N Field_Decimal]]),Define the next field in a table.
                      92,S,Save_To_File(),L save_to_file(C string ,C filename [,L append [,L silent ]]),Save a string to a file
                      92,C,Chrtran(),C CHRTRAN(C string_1,C string_2,C string_3),Replaces a portion of one string with another.
                      88,C,Xbasic_Wait_For_Idle(),V XBASIC_WAIT_FOR_IDLE([N wait_time]),Run current script asynchronously (after call) and wait for an idle.
                      86,C,Error_Text_Get(),C ERROR_TEXT_GET([N error_code]),Retreive the error text for an error code (last error code if ommitted).
                      84,C,Padr(),C PADR(C,N length,C pad_string),Pads the right side of a string with another string.
                      80,C,Error_Line_Number_Get(),N ERROR_LINE_NUMBER_GET([N SESSION]),Report the line that the error occured on.
                      78,M,Table.External_Record_Content_Get(),  TABLE.External_record_content_get(c setname ,c content_expression [,c order [,c filter [,n level ]]]),method
                      77,S,Prop_Valid(),L prop_valid(P dot_variable ,C property [,L recursive ]),Tests whether a dot variable has a specified property
                      75,C,Properties_Enum(),C PROPERTIES_ENUM(P variables[,C variable_enum_flags[,C typemap]]),Returns CR-LF serarated property list.
                      74,C,Rat(),N RAT(C substring,C string[,N occurance]),Returns the position of one string found in another, relative from the end of the string.
                      74,C,Atc(),N ATC(C search_string,C string[,N occurrence]),Returns the position where one string is found within another.
                      71,M,File.To_Blob(),  FILE.To_blob(C Filename),Reads a file to a in memory blob.
                      67,C,Ui_Modeless_Dlg_Refresh(),V UI_MODELESS_DLG_REFRESH(C title[,L asynchronous]),Refresh the contents of the named modeless dialog box.
                      65,M,Table.External_Field_Name_Get(),  TABLE.External_field_name_get(c setname [,c format ]),method
                      64,M,File.Copy(),  FILE.copy2(C source_filename ,C dest_filename [,L only_copy_if_newer ]),Same as File.Copy(), but if the dest_filename folder does not exist, then creates it.
                      63,C,Lower(),C LOWER(C character),Converts a character string to lowercase.
                      61,C,Quote(),C QUOTE(C string[,C quotechar]),Returns the quoted value - useful for expressions generating other expressions.
                      57,S,Ui_Get_Text(),C UI_GET_TEXT(C title,C prompt[,C default_choice[,C format_string]]),Prompt user for text.
                      57,C,Filter_String(),C FILTER_STRING(C string ,C sub_string,[C delimiter[,L exclude]]),Filter in/out words that contain case insensitive sub_string from a list, default delimiter is CR-LF.
                      53,C,Dir_Put(),C DIR_PUT(C directory_name),Changes the current directory (on the specified drive).
                      52,S,A5_Getapplicationdatafolder(),C A5_GetApplicationDataFolder([L lAllUsers ]), Return the application data folder where settings should be stored
                      52,M,A5.Active(),  A5.Active([L fullname]),Returns the name of the control that has focus.
                      52,C,Stritran_Multi(),C STRITRAN_MULTI(C character,C substrings,C replacements),Replaces occurrences of strings in one cr-lf list with strings in another cr-lf list - compare is case insensitive.
                      52,C,Recno(),N RECNO([C tablename]),Returns the record number of the current record.
                      50,M,Table.Index_Add(),  TABLE.Index_Add(C Tagname,C Order_expression[,C Filter_expression[,C Index_Type]]),Add the next tag.
                      50,M,A5.Table_Enum(),  A5.Table_Enum(C lastname[,N options]),Returns the name of the next Table in the current database.
                      46,C,Function_Prototype_Get(),C FUNCTION_PROTOTYPE_GET(C function),Get the prototype for a named function.
                      45,S,A5_Is_Path_Valid(),L a5_is_path_valid(C path_name ),Tests if a folder name is valid.
                      44,M,Addin.Run(),  ADDIN.Run(C operationname [, C Filter [,C Order ]]),Run a AddIn.
                      44,C,Sys_Open(),V SYS_OPEN(C Filename),Open a file using the files registered open method.
                      43,M,A5.Get_Shared_Path(),  A5.Get_Shared_Path(),Returns the current Shared path.
                      42,C,Sys_Shell(),N SYS_SHELL(C command_line[,N window_style]),Run a program, returing the hwnd of the program run.
                      41,C,Filter_String_Smatch(),C FILTER_STRING_SMATCH(C string ,C pattern,[C delimiter[,L exclude]]),Filter in/out words that match (using smatch) the pattern, default delimiter is CR-LF.
                      40,S,A5_Getaddinsinstalledfolder(),C A5_GetAddinsInstalledFolder([C type ]), Return the location of the installed addins folder
                      40,C,Round(),N ROUND(N number,N decimal_places),Rounds off a number to a specified number of decimal places.
                      40,C,Ceiling(),N CEILING(N number),Returns the smallest integer that is greater than or equal to a number.
                      39,S,Odbc_Dt_To_D(),D odbc_dt_to_d(C odbc_datetime ),Converts a character field containing a Date-Time value in format "YYYY-MM-DD HH:MM:SS.SSS" to a date field.
                      39,M,A5.Close(),  A5.Close([L no_check]),Closes the main Alpha Five program window.
                      39,C,Is_Object(),L IS_OBJECT(P object_pointer | C object name),Tests whether the object named by the pointer or string exists.
                      38,S,Extract_String(),C extract_string(C string ,C start_string ,C end_string [,N occurrence[,L include_tags [,L case_sensitive [,L regex_safe ]]]]),Extracts the nth occurrences of a sub-string starting with 'start_string' and ending with 'end_string'.
                      37,S,Word_Number_Get(),N word_number_get(C string ,C substring ,C delimiter [,L match_full_words_only [,L caseSensitive ]]), Returns the word number of the word in which substring was found.
                      37,M,Statusbar.Enable(),  STATUSBAR.Enable(),Enables the StatusBar window.
                      36,C,Space(),C SPACE(N number_of_spaces),Returns a character string containing a specified number of spaces.
                      33,S,Char_To_Blob(),B char_to_blob(C str ),
                      33,M,Table.Filename_Get(),  TABLE.Filename_Get([C tablename]),Get the filename of the table, if name specified, returns full path to provided database name.
                      33,C,W_Upper(),C W_UPPER(C character),Capitalizes the first character of each word in a character string.
                      32,M,Ole.Create(),  OLE.Create(C table_or_set,C format[,P style]),Creates on-the-fly layout from a definition for the table/set named.
                      31,S,Ui_Get_List2(),C ui_get_list2(C title ,C default ,C choices [,N style [,L preserve_selection_order ]]),Prompts user for selection from a CR-LF delimited list of choices. Style: 1 = single select, 2 = multi-select (click item to select), 3 = multi-select (Shift+Click, Ctrl+Click and Drag are supported)
                      30,C,Property_From_String(),V PROPERTY_FROM_STRING(P destination,C source[,C format]),Recover previuosly dumped contents back into a pointer, format allows for optional user spec.
                      28,S,Pos_From_Word_Number(),N pos_from_word_number(C string ,N word_number [,C separator ]),Returns the starting character position of word_number in string.
                      28,C,Ui_Yield(),N UI_YIELD(),Let windows process messages.
                      27,S,A5_Owner_Draw_List_Fmt(),C a5_owner_draw_list_fmt(C input_list ,P format_style [,C mode ]),Used to apply formatting codes to a CRLF delimited string that is displayed in an owner draw control on an Xdialog.
                      27,M,A5.Get_Exe_Name(),  A5.Get_Exe_Name(),Returns the name of the running executable.
                      27,C,Totime(),C TOTIME(N seconds,N format_code,N decimal_places),Converts a time value to a formatted time character string.
                      27,C,Tablecount(),N TABLECOUNT(C tablename,C filter),Returns the number of matching records in a specified table.
                      26,C,Dir_Get(),C DIR_GET(),Returns the current working directory
                      26,C,*From_Hex(),B *FROM_HEX(C hex),Convert hexadecimal data to binary data.
                      25,S,Filename_Decode(),C filename_decode(C filename [,C reference_path ]),Converts aliased, relative filename to real filename
                      25,M,A5.Script_Enum(),  A5.Script_Enum(C lastname|N object_enum_flags),Returns the name of the next saved Global Script.
                      25,C,Ui_Get_Radio(),C UI_GET_RADIO(C title,C default_choice,C choice1[,C choice 2,...]),Prompt user for selection from radio button.
                      24,S,Ui_Get_Path(),C ui_get_path(C title ,C drive_list ,C default ),Prompt user for a file path. If drive_list is blank, shows all drives. Drive_list is a semi-colon delimited list of drives.
                      24,S,Api_Getmachinename(),C API_GetMachineName(),Returns the name of the current computer.
                      24,C,*From_Hexc(),C *FROM_HEXC(C hex),Convert hexadecimal data to string data.
                      23,S,Dir_Create_Recurse(),L dir_create_recurse(C folder ),Creates a folder, creating as many sub-folders as necessary.
                      23,M,Table.Name_Normalize(),  TABLE.Name_Normalize(C name),Normalize a table name.
                      23,C,Padc(),C PADC(C,N length,C pad_string),Pads both sides of a string with another string.
                      23,C,Case(),A CASE(L condition_1,A result_1,[L condition,A result]...),Selects first TRUE clause and returns the appropriate value.
                      23,C,Addmonths(),D ADDMONTHS(D date,N months),Adds a number of months to a date.
                      22,S,Crlf_To_Comma(),C crlf_to_comma(C list ),Transforms a CR-LF delimited list to a comma delimited list
                      22,M,Table.Index_Create_Begin(),  TABLE.Index_Create_Begin(C Tagname,C Order_expression[,C Filter_expression[,C Index_Type]]),Begin creation of a new index, add the first tag.
                      22,M,File.Create(),  FILE.create_time(C filename ),Returns the date/time at which a file was created
                      22,C,Ui_Editor_Get(),P UI_EDITOR_GET(),Get an object pointer to the currently open (with focus) editor.
                      22,C,Ui_Dlg_Is_Active(),L UI_DLG_IS_ACTIVE(C title),Is the dialog active (focus on dialog or parent).
                      22,C,Cyear(),C CYEAR(D date),Converts a date to a character value of the form 'YYYY'.
                      22,C,Ctodt(),T CTODT(C character),Converts a charcter string to a time value (date + time).
                      22,C,*To_Hex(),C *TO_HEX(B data),Convert binary data to hexadecimal data.
                  Regards,

                  Ira J. Perlow
                  Computer Systems Design


                  CSDA A5 Products
                  New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
                  CSDA Barcode Functions

                  CSDA Code Utility
                  CSDA Screen Capture


                  Comment


                    #10
                    Re: how to Blob_to_char ?

                    Ira,
                    Unless it's something you need stored permanently, it is wrong
                    relating to having to write a blob to file and then read it back into a memo field.

                    Just to give a case in point of where it is necessary. I have reports in which, for user friendliness, there is a choice to have the filter criteria printed on the report. Dependent upon what is chosen, there could be hundreds of these if individual products were chosen as part of the filter. So it is never stored anywhere for future use, but to get it into the report I used a memo field as I could not find another way....and a memo will accept character but not blob (which I still find odd considering a memo is basically a blob).

                    If there is a different way (be great if a simpler way was available), noone had suggested it when I posted this scenario quite some time ago as a problem.
                    Mike
                    __________________________________________
                    It is only when we forget all our learning that we begin to know.
                    It's not what you look at that matters, it's what you see.
                    Henry David Thoreau
                    __________________________________________



                    Comment


                      #11
                      Re: how to Blob_to_char ?

                      Mike,

                      I'm struggling with being able to allow a user to choose many many items for a report similar to what you describe above with your products. As long as the request is for a few of this and a few of that then the filter builds and sends it to the report, but how did you manage to build the filter where there could be hundreds of items in the selection criteria? At that point my filter is too long as Stan pointed out to me in a naother thread, but I don't know a) how to check the length of the filter and b) if it's over 1024 what do I do now? Can you describe how you did it or shoot me a quick example?

                      Thanks

                      -John

                      Comment


                        #12
                        Re: how to Blob_to_char ?

                        Hi John,
                        I had started to answer your other thread but will do so here instead. The memo field I referred to here does not really play a part in how I can use a large filter.

                        I worked around it by using a filter that looked at a logical field rather than say the actual field name. In my case I added a logical field to all the corresponding tables needed. I then set up a report filter form such as what you see in the attached screenshot. Each button will bring up a form (second screenshot) in which all the various items can be chosen.

                        My filter reflects only these logical choices. A very small excerpt from my script showing the basic way I did this....as you can see, the query.filter = line at the bottom shows almost all the various filters concatenated together much like you did.
                        The filters are simply looking for any record that has a logical value of True (checked). If none are checked then I want all to be included so the filter chooses all that have a False value (unchecked)

                        Code:
                        query.filter =""
                        
                        dim Prd_cnt as n
                        Prd_cnt= tablecount("prod","Prodchbox")
                        if Prd_cnt = 0 then
                          rPrd=".not. Prod->Prodchbox"
                         else
                          rPrd="Prod->Prodchbox"
                        end if
                        
                        dim PType_cnt as n
                        PType_cnt=tablecount("sel_prod_type","Chbx_Ptype")
                        if PType_cnt=0 then
                           rPrdTyp=".not. sel_prod_type->Chbx_Ptype"
                         else
                           rPrdTyp="sel_prod_type->Chbx_Ptype"
                        end if
                        
                        dim mach_cnt as n
                        mach_cnt=tablecount("mach","Mckbox")
                        if mach_cnt=0 then
                           rMch=".not. mach->Mckbox"
                         else
                           rMch="mach->Mckbox"
                        end if
                        
                        query.filter =rPrd+".and."+rPrdTyp+".and."+rMch+".and."+rMchTyp+".and."+rCo+".and."+rCoTyp+".and."+rTrp+".and."+rRt+".and."+rActTyp+".and."+rPayTyp
                        query.order = "recno()"

                        Hope it helps getting you started if this approach is something that will fit into your application.



                        Mike
                        __________________________________________
                        It is only when we forget all our learning that we begin to know.
                        It's not what you look at that matters, it's what you see.
                        Henry David Thoreau
                        __________________________________________



                        Comment


                          #13
                          Re: how to Blob_to_char ?

                          Hi Mike,

                          I was thinking along the same lines. Looks like yours is for the desktop whereas mine is web. Anyway, here's what I was thinking of doing. Each of my tables will have a Selectrpt field and the Report criteria will be something like P_Psychos->Selectrpt="Y".AND.P_Schools->Selectrpt="Y". I would display a dialog where the user can pick the records they want to see in the report and once they click [Submit] I'd like for code to update the the Selectrpt field in each of the tables; that's where I'm stuck. I don't know how to do that and I just don't understand how the *For_Each() works no matter how many times I read the help file. If I use the *For_Each() how/where do I put the tbl.change code? I'm embarrassed :o to say how long I've been working on this one report.

                          Comment


                            #14
                            Re: how to Blob_to_char ?

                            John,
                            Be best to ask this question in your other thread as it is a web question now---my desktop solution, although analogous, is created differently from the webside.

                            (I'll be watching the other thread for the solution as well as I believe it will be of value for many applications)
                            Mike
                            __________________________________________
                            It is only when we forget all our learning that we begin to know.
                            It's not what you look at that matters, it's what you see.
                            Henry David Thoreau
                            __________________________________________



                            Comment

                            Working...
                            X