如何更改firebird3中的列类型(How change a column type in firebird3)

由于firebird 3我不能修改列类型

在我使用这种更新之前:

update RDB$RELATION_FIELDS set
RDB$FIELD_SOURCE = 'MYTEXT'
where (RDB$FIELD_NAME = 'JXML') and
(RDB$RELATION_NAME = 'XMLTABLE')

因为我得到ISC错误335545030。

也许火鸟3有另一种方式?


Since firebird 3 I can't modify a column type

Before I use this kind of update :

update RDB$RELATION_FIELDS set
RDB$FIELD_SOURCE = 'MYTEXT'
where (RDB$FIELD_NAME = 'JXML') and
(RDB$RELATION_NAME = 'XMLTABLE')

because I get ISC error 335545030.

Maybe there is another way in firebird 3 ?


原文:https://stackoverflow.com/questions/48267131
2023-11-16 19:11

满意答案

目前还不清楚你打算做什么,但代码完全按照你的要求去做。

AC“string”是一系列以null值结尾的char元素。 无论什么后面的空值不是字符串的一部分。

通话前的字符串:

“9210070627”(后跟一个空值,以及一系列可能属于缓冲区或调试器工件的空值,我们不知道)。

你的来电:

strcpy(buffer, "") (将空字符串复制到缓冲区,并以null值终止)

通话后你的字符串:

“” - 一个空字符串,后跟终止空值(加上“210070627”和前一个内容中剩余的空值作为工件,如上所述,这些工件不属于字符串的一部分)。

因此,您的缓冲区现在包含一个空字符串,如您所指示的那样。 它还包含原始数据的剩余部分,但buffer 确实指向空字符串。 strlen( buffer ) == 0

如果您打算擦除缓冲区的内容,即将整个缓冲区memset() ,则应尝试memset()


It is unclear what you intended to do, but the code does exactly what you told it to do.

A C "string" is a series of char elements that ends with a null value. Whatever comes after that null value is not part of the string.

Your string before the call:

"9210070627" (followed by a null value, and a series of null values that might be part of the buffer or an artifact of the debugger, we don't know).

Your call:

strcpy(buffer, "") (copy empty string into buffer, and terminate with null value)

Your string after the call:

"" -- an empty string, followed by the terminating null value (plus the "210070627" and null values remaining from the previous content as artifacts which aren't part of the string as mentioned above).

So, your buffer now contains an empty string, as you instructed. It also contains remains of the original data, but buffer does point to an empty string. strlen( buffer ) == 0.

If you are intending to erase the contents of the buffer, i.e. zero-out the whole buffer, you should try memset().

相关问答

更多

生成依赖于字符串散列的随机数(Generate random numbers that depend on string hash)

我同意nihlon,如果你想要的是一个函数f()返回一个int,使得f(string1) != f(string2)对于任何string1 , string2在某些字符串S ,那么你正在寻找一个完美的哈希 。 显然,如果S是所有可能字符串的集合,则有2 ^ 32甚至2 ^ 64的方式,所以不存在返回int或甚至long这样的f() 。 因此,问题是: S如何表征? 另外,你确定你需要独特的数字为不同的字符串? 在大多数问题领域中,常规哈希是足够的... I agree with nihlon, i...

字符串结尾时的PHP字符串比较可以包含随机数(PHP string comparison when string ending can contain random numbers)

我在这里想正则表达式。 <?php function didMySqlDbRestart($sshCommandResponseString){ return preg_match('/process \d+$/', trim($sshCommandResponseString)) > 0; } if(didMySqlDbRestart($sshCommandResponseString)){ echo 'SUCCESS: MySQL Database Rebooted...

strcpy将随机数添加到空字符串(strcpy adding random numbers to empty string)

目前还不清楚你打算做什么,但代码完全按照你的要求去做。 AC“string”是一系列以null值结尾的char元素。 无论什么后面的空值不是字符串的一部分。 通话前的字符串: “9210070627”(后跟一个空值,以及一系列可能属于缓冲区或调试器工件的空值,我们不知道)。 你的来电: strcpy(buffer, "") (将空字符串复制到缓冲区,并以null值终止) 通话后你的字符串: “” - 一个空字符串,后跟终止空值(加上“210070627”和前一个内容中剩余的空值作为工件,如上所述,...

如何在python中打印100个随机数的“set”并将它们添加到空集()(how to print 100 random numbers of “set” in python and add them to empty set())

正如评论所说,该集合不能包含重复的数字,因此您需要执行while循环,直到获得集合中所需的元素数量。 然后添加一个随机数 import random s=set() while len(s) < 100: s.add((random.randint(0,200))) print(s) print(len(s)) as comments said the set can't contain duplicated numbers, so you need to execute a while...

向数组添加随机数的问题(Issues with adding a random numbers to an array)

在你的方法getArray 代码 value = new int[randomValues]; 只是创建一个大小为ramdomValues的新的空int数组。 由于int的默认值为0 ,因此您将获得该值 同样在你的getRandom方法中,你一次又一次地设置相同的值 for (...) randomValues = random.nextInt(100); 尝试 public int[] getRandomArr() { int randomValues [] = new int ...

添加时如何选择两个没有进位的随机数(How to pick two random numbers with no carry when adding)

一种简单且分布正确的方法是使用拒绝采样 ,即“接受/拒绝”。 独立生成值,如果违反进位约束,则重复。 在伪代码中 do { generate x, y } while (x + y > threshold) 循环迭代的次数具有几何分布 ,其预期值为(低于阈值的和的比例) -1 。 例如,如果您在90%的时间内低于阈值,则长期迭代次数将平均为每次生成的10/9,1.11 ...迭代次数。 为了降低接受可能性,平均需要更多尝试。 An easy and distributionally cor...

生成随机数,将它们添加到数组中,然后使用冒泡排序对它们进行排序(Generating random numbers, adding them to an array, and then sorting them using bubble sort)

你的bubbleSort方法会对数组进行排序,即它会改变现有的数组。 此外,它具有void返回类型,因此您不能将其作为参数传递给Arrays.toString 。 我相信你需要替换这一行: System.out.println("Bubble Sorted Numbers:" + Arrays.toString(bubbleSort(list))); 有以下两行: bubbleSort(list); System.out.println("Bubble Sorted Numbers:" + Ar...

将随机空字符串值添加到对象的日志(Log adding random null string value to object)

在FormActivity ,似乎没有初始化soat... private String soat, rtm, src, str, to; 并且日志尝试追加字符串: soat += mSP.getString("soat", ""); 在.gif中,我们可以看到soat, rtm, src, str, to都是null 你能在字符串soat, rtm, src, str, to上显示其他操作吗? 我对调试的看法是:尝试给soat, rtm, src, str, to提供一些“单词” soat, r...

添加随机数会使它们更随机吗?(Does adding random numbers make them more random?)

没有。 随机性不是累积的。 rand()函数使用两个定义的端点之间的均匀分布。 添加两个均匀分布会使均匀分布无效。 它会形成一个奇怪的金字塔,最容易向中心倾斜。 这是因为概率密度函数的累积具有增加的自由度。 我恳请你读一读: 统一分配 和这个: 卷积 特别注意屏幕右上角的两个均匀分布会发生什么。 您可以通过将所有总和写入文件然后在excel中绘图来证明这一点。 确保给自己足够大的样本量。 25000就足够了。 No. The randomness is not cumulative. The ra...

在JavaScript中生成字符串中的随机数(Generate random numbers from string in JavaScript)

我当前的解决方案使用CryptoJS库的MD5散列函数来生成随机数: // seed is the user's random number choose_option = function(seed, test_name, options) { word = CryptoJS.MD5("" + seed + test_name).words[0]; // take first 32-bit word i = Math.abs(word % options.length); retu...

相关文章

更多

ServletOutputStream cannot be resolved to a type

在使用jsp生成web图片时遇到这个问题,这是源代码中的一条语句,源代码可以执行,可是一将源码放入ec ...

Create a Bootable MicroSD Card

http://gumstix.org/create-a-bootable-microsd-card.h ...

Becoming a data scientist

Data Week: Becoming a data scientist Data Pointed, ...

Spring Data: a new perspective of data operations

Spring Data: a new perspective of data operations ...

Solr: a custom Search RequestHandler

As you know, I've been playing with Solr lately, tr ...

HTML 超链接(a标签、锚)

a标签: anchor锚 1.超链接 -&gt; 点击之后跳转页面 格式: 协 ...

按钮样式

网页上有很多功能是通过链接方式传递参数,这种功能链接普通样式就是一个超链接退出,如果将超链接的样式变成 ...

Securing Solr on Tomcat access using a user account

Open [Tomcat install dir]\tomcat-users.xmlfor editi ...

最新问答

更多

您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)

将diff文件复制到存储库的根目录,然后执行以下操作: git apply yourcoworkers.diff 有关apply命令的更多信息, apply 见其手册页 。 顺便说一下:一个更好的方法是通过文件交换整个提交文件是发送者上的命令git format-patch ,然后在接收器上加上git am ,因为它也传送作者信息和提交信息。 如果修补程序应用程序失败,并且生成diff的提交实际上在您的备份中,则可以使用尝试在更改中合并的apply程序的-3选项。 它还适用于Unix管道,如下

将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)

尝试将第二行更改为snprintf(buf1, sizeof buf1, "%.2f", balance1); 。 另外,为什么要声明用该特定表达式分配缓冲区的存储量? EDIT @LưuVĩnhPhúc在下面的评论中提到我的原始答案中的格式说明符将舍入而不是截断,因此根据如何在不使用C舍入的情况下截断小数,您可以执行以下操作: float balance = 200.56866; int tmp = balance1 * 100; float balance1 = tmp / 100.0; c

OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)

这是简单的解决方案 在你需要写的控制器中 BackendMenu::setContext('Archetypics.Team', 'website', 'team'); 请参阅https://octobercms.com/docs/backend/controllers-views-ajax#navigation-context BackendMenu::setContext('Author.Plugin name', 'Menu code', 'Sub menu code'); 你需要在r

页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)

每当发出请求时ASP都会创建一个新的Page对象,并且一旦它将响应发送回用户就不会保留对该Page对象的引用,因此只要你找不到某种方法来保持生命自己引用该Page对象后,一旦发送响应, Page和只能通过该页面访问的所有对象才有资格进行垃圾回收。 ASP creates a new Page object whenever a request is made, and it does not hold onto the reference to that Page object once it

codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)

要在生产服务器中调试这个,你可以临时放 error_reporting(E_ALL); 并查看有哪些其他错误阻止正确的重定向。 您还应该检查生产服务器发送的响应标头。 它是否具有“缓存”,是否需要重新验证标头等 to debug this in production server, you can temporary put error_reporting(E_ALL); and see what other errors are there that prevents the proper

在计算机拍照在哪里进入

打开娥的电脑.在下面找到视频设备点击进去就可以了...

使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)

你是对的。 第一次输入后,换行符将保留在输入缓冲区中。 第一次读取后尝试插入: cin.ignore(); // to ignore the newline character 或者更好的是: //discards all input in the standard input stream up to and including the first newline. cin.ignore(numeric_limits::max(), '\n'); 您必须为#inc

No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)

for (int k = 0; k > 10; k++) { System.out.println(k); } k不大于10,所以循环将永远不会执行。 我想要什么是k<10 ,不是吗? for (int k = 0; k < 10; k++) { System.out.println(k); } for (int k = 0; k > 10; k++) { System.out.println(k); } k is not greater than 10, so loop

单页应用程序:页面重新加载(Single Page Application: page reload)

优点是不注销会避免惹恼用户,以至于他们会想要杀死你:-)。 说真的,如果每次刷新页面时应用程序都会将我注销(或者在新选项卡中打开一个链接),我再也不会使用该应用程序了。 好吧,不要这样做。 确保身份验证令牌存储在刷新后的某个位置,即不在某些JS变量中,而是存储在cookie或本地存储中。 The advantage is that not logging off will avoid pissing off your users so much that they'll want to kill

在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)

EXECUTE IMMEDIATE 'SELECT '||field_val_temp ||' FROM tableb WHERE function_id = :func_val AND rec_key = :rec_key' INTO field_val USING 'STDCUSAC' , yu.rec_key; 和, EXECUTE IMMEDIATE 'UPDATE tablec SET field_val_'||i||' = :field_val' USI