取消
显示结果 
搜索替代 
您的意思是: 

String # of Characters Limitations

I am working on a database program right now and am having trouble setting the number of characters I am able to save to the database in a string.  For example, if I want to save the following, abcdefghijklmnopqrstuvwxyz, the program will save only the first 20 characters (inclusive to 't') of the string.  Is there a reason for this?  Or, is there a way to get around this?

For a little insight, there are about 12 database fields being updated/saved together.  The 12 fields are collected using the "format into string" function and then passed to another subvi for updating the database.

Thanks,

David

0 项奖励
1 条消息(共 9 条)
4,660 次查看
did you check the character length specified for that parameter in the database? how much it is?
Anil Punnam
CLD
LV 2012, TestStand 4.2..........
2 条消息(共 9 条)
4,656 次查看

Anil,

The field size is set to 100.

David

0 项奖励
3 条消息(共 9 条)
4,651 次查看
is it possible for you to post your code here?
Anil Punnam
CLD
LV 2012, TestStand 4.2..........
0 项奖励
4 条消息(共 9 条)
4,643 次查看

Here are screenshots of the program.  If you need the .vi, let me know.  I don't think having it will help to much as it is also a subvi.

David

0 项奖励
5 条消息(共 9 条)
4,630 次查看

Anil,

The field of concern is the assetnumber field.  All the fields will utimately need to be worked on; but, for now, I am just trying to get the one.

David

0 项奖励
6 条消息(共 9 条)
4,615 次查看

Hi David,

 

I had this problem too a while back. A little bit of digging showed that:

1) the problem is OS specific (to an extent, see the next bit)

2) the folder path is part of the filename, the total filename length from the root directory to the folder is a maximum number of chars on each operating system - I forget the numbers now.

 

3) Workaround for windows:

Take the folder you are writing to, Subst a drive letter to it, or just above it (cmdline subst /? should help here)

Write to the [new drive letter]:\[filename] - this is a much shorter path than the full original path and should work.

 

(This is most often a problem when writing to Network drives)

 

Hope this helps

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
7 条消息(共 9 条)
4,595 次查看

Everyone,

 

After several hours of digging into someone elses work (this vi and issue), I found that he was limitting the size of the text field through, once again, another subvi.  Thanks for all of your interest.  The jpg below shows were/how he was limiting the text input field, for everyones reference.

 

Thanks,

 

David

8 条消息(共 9 条)
4,578 次查看

Now if that had been an FGV originally to store the data, with a check on the input case every time it was updated (maybe we'll call this one and Action Engine then) You'd have found the solution so much faster!!

 

Well done for finding it!

Kill the Globals if you have time so you have better traceability for next time 高兴表情 (and have words about the use of globals for that sort of thing with the original developer.) 吐舌表情

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 项奖励
9 条消息(共 9 条)
4,569 次查看