473,382 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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 3396
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
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
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
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
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
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
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
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
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
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
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. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

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.