473,507 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

StrConv and expected error

What is wrong with this code,

bStr() As Byte

bStr = StrConv("yeas",vbUnicode)

I can only assume I am missing a tools->reference,
but for string conversion?
Nov 12 '05 #1
1 3404
Well, on one level there is nothing wrong with it -- if the code does not
run then that suggests that you may have a reference problem.

On another level, this code makes no sense. You are taking a Unicode string
(all strings in VB are Unicode BSTRs), converting it as if it were a CP_ACP
string to something that can only be called "double-secret Unicode", and
then assigning that meaningless string to a byte array.

References -- andy reference problem can make all code fail, even known VBA
refs.

The other problem is one that cannot be resolved until you explain what you
are trying to do.
--
MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies

This posting is provided "AS IS" with
no warranties, and confers no rights.
"bigbinc" <bi*****@hotmail.com> wrote in message
news:d1**************************@posting.google.c om...
What is wrong with this code,

bStr() As Byte

bStr = StrConv("yeas",vbUnicode)

I can only assume I am missing a tools->reference,
but for string conversion?

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
11257
by: Leader | last post by:
HI, i got a problem while using StrConv function in sql server. My requirement is:- suppose in a name field i have "jhon smith" Now i want to run a sql which will give me the result like "Jhon...
5
5195
by: andy.herrera | last post by:
I'm getting this Error Message. Expected ';' Please Select One: <form name="form1"> <<------------ Error is here. <select name="selectTrans" onChange="If (this.value == 'checkout')...
1
539
by: bigbinc | last post by:
What is wrong with this code, bStr() As Byte bStr = StrConv("yeas",vbUnicode) I can only assume I am missing a tools->reference, but for string conversion?
1
23866
by: sbcglobal | last post by:
I am using VS .Net 2003 and trying to convert a unicode data (vb .net default string type?) to single byte using BData = StrConv(UData, vbFromUnicode) it is a method mentioned in...
0
1226
by: Norton | last post by:
I am using StrConv to convert simplified chinese encoding string to a traditional chinese coding string strResult = StrConv(strSimplifiedChinese, VbStrConv.TraditionalChinese) It works on one...
2
3313
by: YAN | last post by:
Hello, I can successfully return a traditional String by following code when user's OS is XP, but it return empty string when user's OS is 98, how can i slove it?? iString =...
3
3778
by: MLH | last post by:
?StrConv("SomeAddr@SomeDomain.net", vbFromUnicode) ??????????? When I use StrConv in the manner shown above, a bunch of question marks is all I ever see returned. Why might that be? Of what...
1
2134
by: MLH | last post by:
Tom van Stiphout pointed out a syntaxn error that I had made using StrConv on Mar 28. I was using vbFromUnicode instead of vbUnicode. So, am OK on that now. Can someone help me understand what...
1
3881
by: JOJO123 | last post by:
I got here in search of an answer to this Javascrpt question. I upgraded jave on XP Ie 7, acrobat 5.1 and suddenly can't open any pdf files on web sites using IE. I see u guys all say, this is a...
6
5307
by: Lawrence Spector | last post by:
I ran into a problem using g++. Visual Studio 2005 never complained about this, but with g++ I ran into this error. I can't figure out if I've done something wrong or if this is a compiler bug. ...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7114
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7488
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5045
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.