l**u 发帖数: 67 | 1 I am using vb6. and i found out that change
Newtxt = Oldtxt.Replace(" ' ", " '' ") into
Newtxt = Replace(txtName.text, " ' ", " '' ")
And it works.
I am not very aware of VB and VB.net. Why if i use vb6, it is wrong?
Thanks
single
still | aw 发帖数: 127 | 2 hehe, u've found it yourself.
in .net, string is a class, which has a method called replace, so you can use
[object].[method], in vb6, replace is only a system function, not belong to
any object, the same as instr(), split(), ....
it
name.
【在 l**u 的大作中提到】 : I am using vb6. and i found out that change : Newtxt = Oldtxt.Replace(" ' ", " '' ") into : Newtxt = Replace(txtName.text, " ' ", " '' ") : And it works. : I am not very aware of VB and VB.net. Why if i use vb6, it is wrong? : Thanks : : single : still
|
|