Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Data Type Symbols


Hello all,

Just a quick question about the data type symbols in VB. I know some of them, like $ for string, % for integer, but I'm wondering if anyone knows of a reference for the rest. I used to have an MSDN link with that info but I can't find it anymore.

Can anyone help me out?

Thanks,
illsorted




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Get Data Between Symbols
I have some data that looks like this:


Code:
data = "Name=[bob]"
data = data & "Age=[18]"
data = data & "Sex=[male]"

I basically want to be able to call a function that returns whatever is in the brackets. So for example:

GetBrackets("Name", data)
GetBrackets("Sex", data)

Will return "bob" & "male". Any ideas?

Why Data Report Displays Funny Symbols When I Use Njstar
Can VB insert and display chinese word? I have tried it by using njstar and chinese word star, and found that I can't use the chinese word star to enter chinese word. Then, I use the njstar to enter chinese word, it works.

However, I try to display the chinese word in the flexgrid, it only shows some strange symbol, although I have opened the njstar.

Besides, the data report also can't display chinese word for the first time. (it means: when I click the "show data report" button for the first time, at the same time I also open the njstar, but it shows some funny symbols. Then, I closed the njstar and open it (njstar) again, and I also click the "show data report" button again. This time the data report can show chinese word). why it happens? ops:



Edited by - tootcsen on 8/17/2004 10:51:25 PM

SQL Server - The Conversion Of A Char Data Type To A Datetime Data Type Resulted.....
Hi All

I have developed an application with vb6.0 and sql server 2000 database and working well on my desktop.

While client saving records in db, sometimes they are getting following error.

"The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value."

I'm using ADOs and code like this...

rstCustomer("joindate") = mskJoinDate
rstCustomer("jointime") = mskJoinTime
rstCustomer.Update

' Here mskJoinDate is maskedit control, contains date in dd/mm/yyyy format only.

' Here mskJoinTime is maskedit control, contains Time in hh:mm format only.

' Both are datetime fields in database.

' These two fields won't contain any other data because I have done perfect validation before assign values to recordset.

Anybody have idea about my problem? Please help me to solve this.

Thanks in advance
Pradeep

'The Conversion Of A Char Data Type To A Datetime Data Type Resulted In An Out-of-ran
Hi,

I am writing a SQl query in visual basic by startdate and end date. It works fine in SQL server and Query Analyser but when query comes into visual basic it error and the message is 'The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.'

The code:

declare @cMonth int, @year varchar(10), @first_sDate datetime, @first_eDate datetime, @Second_sDate datetime, @Second_eDate datetime
set @cMonth = datepart(month, getdate())
set @year = datepart(year, getdate())
set @first_sDate = @year + '-01-01' + ' 00:00:01'
set @first_eDate = @year + '-06-30' + ' 11:59:59'
set @Second_sDate = @year + '-07-01' + ' 00:00:01'
set @Second_eDate = @year + '-12-31' + ' 11:59:59'

if @cMonth <= 6
begin
select *
from pub
where created_date BETWEEN @first_sDate and @first_eDate
end
else
begin
select *
from pub
where created_date BETWEEN @second_sDate and @second_eDate
end

In here two sets of data need to represent first six month and second six month.

how do change varchar to datetime? I tried convert but didnot work. Any body can help with the code? The error caused only in visual basic.

Many Thanks

Bravo

Type Mismatch...Data Type Vs. Host Data Type?
I keep receiving the "Type mismatch" error, and I think it stems from several fields containing dates which I am trying to update into a MS Access database. What I am trying to determine is what would be the proper settings for the "Data Type" and "Host Data Type", under the Parameters tab in my Command properties? The format I am hoping to achieve is mm/dd/yyyy. (This is already correctly set in my Regional Settings.) I hope this makes sense...I have been searching the forums and haven't found any descriptions yet of the various options for these two settings.

Convert Long Data Type To Integer Data Type
I am trying to convert an array from a long data type to an integer data type. When I use the Cint() function I am getting an overflow error. Is there a way around this? Basically what I am trying to do is to convert two successive 16 bit representations (stored as a long) number into a floating point using the MoveMemory API. The .ReadResults is an OCX defined function that reads MyLongData(j) from Memory and stores into a long data type.


Code:
Dim MyIntData(2) As Integer
Dim MyLongData(2) As Long

Dim fValue As Single
Dim j As Integer

For j = 0 To 1

MyStatus = MbMasterV71.ReadResults(hConnect, Slave, Cmd, RegStart + j, MyLongData(j))

Next j

MyIntData(0) = CInt(MyLongData(0))

CopyMemory fValue, MyIntData(0), 4

Converting ADO Data Type To DAO Field Data Type
friends
i am getting the datatype of the field from the database, but i am unable to convert to ADO data type to DAO field data type is it is possible is there any functions for it in VB

VBA Data Type For SQL Server 2000 Int Data Type
Can someone please refresh my memory?

If I have a SQL Server int data type, should I use a Long data type in VBA?

------------------------------------------------------------------------------------------------
Put your PC to good work at vbCity at world community grid and join Team vbCity.
2,669,763 3,325,308 points and ranked 1,195 1,149 as of March 8 May 23, 2008!
------------------------------------------------------------------------------------------------

Edited by - Geof on 7/2/2007 8:33:10 AM

How To Dynamically Change A Data Type Of A Variable From One User Defined Type To Another
I have a situation like this. I want to declare a variable of a user
defined type that changes dynamically.
Like i have a user defined type called type1 and another called type2.
And i use

DIM var1 as type1

At later point of time i want the same variable to be declared to
type2. Use of REDIM is for arrays only and not for user defined types.
Is there any solution? Your suggestions would be of great help to me

Bye
Tej

Type-declaration Character Does Not Match Declared Data Type
Type-declaration character does not match declared data type?
I don`t get it
This error message appears and Left$ is marked in the code, I guess it has something to do with types, but what?
Please help



Code:
Open Sti & "DeaktiverteDager.txt" For Input As #1
While Not EOF(1)
Line Input #1, LinjeITekstFil
LinjeLengde = Len(LinjeITekstFil)
RestAvLinje = LinjeLengde - 2

If Left$(LinjeITekstFil, 1) = Left$(label10.caption) Then
For i = 0 To 4
If Mid$(LinjeITekstFil, 3, RestAvLinje) = Label3(i).Caption Then
Label3(i).Visible = False
Label5(i).Visible = False
Text1(i).Visible = False
Text2(i).Visible = False
Command1(i).Visible = False
Command2(i).Visible = False
List1(i).Visible = False
List2(i).Visible = False
End If
Next
Wend
Close #1

Type-declaration Character Does Not Match Declared Data Type
I am getting compiler error "type-declaration character does not match declared data type" . It's highlighting Left$
LVGetItemText = Left$(objItem.Text, nRet)

Derclarations are as below.
VB Code:
Private Type LV_ITEM   Mask As Long   Index As Long   SubItem As Long   State As Long   StateMask As Long   Text As String   TextMax As Long   Icon As Long   Param As Long   Indent As LongEnd Type Public Function LVGetItemText(lParam As Long, hwnd As Long) As String   Dim objItem As LV_ITEM   Dim nRet As Long   'some code   If nRet Then      LVGetItemText = Left$(objItem.Text, nRet)   End Ifexit function

SQL Error: Char Data Type Conversion To Datetime Data Type Error
I created an application which, in one instance, queries an
SQL Server 7 table based on a date entered.
I have installed it on 4 machines (one NT, two 98 & one 95).
It works fine on all but one of the 98 machines.

On this !one! machine I receive the following error:
Error 2147217913 was generated by Microsoft OLE DB provider
for SQL Server The conversion of a char data type to a
datetime data type resulted in an out-of-range datetime
value.

I get the date from a datepicker with the format
"dd/MMM/yyy HH:mm:ss"


Help!

Thanks in advance

Vb Data Type Data Type Question
I have a parameter declared as a long in one of my functions...someone tried to pass an integer to it and got a type mismatch error? Can anyone explain the reason that would occur?

Flexgrid Data - Move Row Automatically As Data Type In Textbox
Dear All,

I have hundered of records in Flexgrid & find a particular record is dififcult & if i want to fiind out particulart record from second column so what i want that in one text box as i type the row which have that data move top or move up.

Pls. help me.

Regards
Bright18

Determine Variant Data Type (wrt Hard Data Types)
Hi,

I am using a variant parameter in a function to simplify my UI for a control. When that funciton is called, the variant parameter will either be a string or a long. I need to determine which has been passed.

(One problem is that a string argument can begin with a number, so that rules out using the VAL function.)
(Since the argument is not an object, I cannot use the IS operator.)

How can I determine the data type of the variant within the function?


Cheers,
Nap.

Can U Say How To Set The Precession As 1 To A "singel" Type Data Type
Hi all!
i want to set the precession of a "single" variable to 1.. is is possible in v.b 6.0? if so , kindly tell me.

egg:
dim x as single
x=4.01234
msgbox(x) ' x shole be 4.0 only ......not 4.01234

so i want to round this.. how it is possible.......

thanks in advance
regards:
raghunadhs

Appending Data To A Data Type Object
Hi,
I've created a Data control which refrences to an Excel sheet.

I'm trying to append data to this sheet using the 'AddNew' method, and then using the Data1.Recordset.Fields.Append method, but for some reason it fails...

can someone please post here a code snippest to do it?

The Excel sheet is a blank one, so i need to append the fields at least at the first time.

Thanks,
Arilou

Symbols
hi,
i have an input box in which the user enters a name and the program creates a folder with that name. but some symbols are not allowed for a folder name. how do i check if the names doesn't contain those symbols?

Symbols
I am making a software for preparing question papers using VB6.0. While entering questions for maths user faces problems when he wants to place symbols like Square root, sign Of integration etc as these are not available in keyboard. For example user types question- Evaluate Square root of 25. Now here instead of writing square root he or she wants to type the symbol for square root and then put the number(25 in example) inside that Square root symbol. Can anyone help me. It is important and urgent and I could not find any solution since many days
Regards
Varinder

Symbols!
In Word, you can choose Insert->Symbol and get a wide array of symbols. Nice!

How can I get access to these symbols from within VB? I'd guess you use the "Symbols" font, but the character codes are in HEX... how does that relate to ASCII?

Help! Ideas?

Daniel

What Are This Symbols?
i've seen several post that uses this symbols: "&lt" and "&gt", what are these symbols?


If (Not blnIsNumeric(KeyAscii)) And KeyAscii &lt;&gt; 8 Then
KeyAscii

Thanks!!!

Symbols - $ And %??
$ and % does anyone know what these symbols mean when place at the end of a variable name ie. map% or distance$

i think the $ means some sort of string but not sure.

thanks fir any help

Currency Symbols
Hi All ... thanks in advance.

I have created a quoting & estimating package that is now getting attention and potential buyers from other countries. In many places in the app, I have to format for different currencies. Rather than using the Windows settings ... I decided to force the issue within the code ... formatting strings and text boxes using the users selection from the made-available currencies.

The problem ... I can get the currency symbols for most of the desired currencies like and ... but can't get it for all. I'm looking for Chinese yuan and some others.

I thought it was a function of the FONT in the IDE but that doesn't seem to help. Even if I create the symbol in say WORD and try to copy and paste ... that doesn't work either.

Any ideas on how I can get these symbols to appear in the VB5 IDE and therefore in the TEXT boxes and such?

Again, thanks in advance.

Admin Symbols
Well, here's the deal, right now I'm almost done with a Winsock Client/Server setup. Is it possible to add admin symbols infront of a username when they sign on as an admin? Any help is much appreciated.

Replacing Symbols
Is there an easier way to replace symbols in a textbox rather than how i am doing it?


Code:
Private Sub Command1_Click()
Text1 = Replace(Text1, "~", ""): Text1 = Replace(Text1, "`", ""): Text1 = Replace(Text1, "!", ""): Text1 = Replace(Text1, "@", ""): Text1 = Replace(Text1, "#", ""): Text1 = Replace(Text1, "$", ""): Text1 = Replace(Text1, "%", ""): Text1 = Replace(Text1, "^", ""): Text1 = Replace(Text1, "&", ""): Text1 = Replace(Text1, "*", ""): Text1 = Replace(Text1, "(", ""): Text1 = Replace(Text1, ", "")", ""): Text1 = Replace(Text1, "=", ""): Text1 = Replace(Text1, "|", "")
Text1 = Replace(Text1, "", ""): Text1 = Replace(Text1, "{", ""): Text1 = Replace(Text1, "}", ""): Text1 = Replace(Text1, "[", ""): Text1 = Replace(Text1, "]", ""): Text1 = Replace(Text1, ";", ""): Text1 = Replace(Text1, ":", ""): Text1 = Replace(Text1, "'", ""): Text1 = Replace(Text1, "/", ""): Text1 = Replace(Text1, "?", ""): Text1 = Replace(Text1, ">", ""): Text1 = Replace(Text1, ",", ""): Text1 = Replace(Text1, "<", "")
End Sub

Symbols Conversion
Hi all,

I got a problem in finding symbols in word 2000. If i find a symbol which is in symbol font say (approximately equal to) i could not find it directly using find text box. Is there any way to do it...

I just want to replace the symbol (approximately equal to) to "/approximate"

Is there any way to do it..

thanks in advance

Mohan

Symbols In List Box
I need to add a symbol such as a tick or box to some items in a list box. The type of symbol is to be applied whilst populating the list from an Access database. Could this be possible?

Symbols Like In Xp Explorer
Hi!

Where do I find the symbols like in explorer (for My Computer, Folder, etc.) - the symbols I found are very old and look so. I wanna build my own explorer - or does an ocx exists with some properties?


Thanx

How Do I Make Symbols?
hi I'd like to know if there is a way to make symbols and put them in a text box. say, something like a copyright or maybe a small hypher or the pi symbol or the imaginary number symbol. when I paste something like that to vb, it shows up as something else, like the small hypher turned into a "u" with an accent on the top. anyone else have ideas? I'd really like to make this work

"I want quality, not quantity; but lots of it."

Use Some Symbols In A String
Hello,

How is it possible to use a symbol in a string. ex: i want to use the phone symbol in my string.

ex:

dim strtemp as string
dim phonenumber as string

strtemp = 'phone symbol' & phonenumber


Pelle

National Symbols
Hi,
i'm creating a little program. but there's one problem: i'm from lithuania and i'm doing that program in my native language. and i have to use some symbols like ą,č,ę,ė,į,. And i can't write them on a label or commmand button caption. how to do that?

Declaration Symbols??
i have seen some programs,and some of their daclaration was kinda odd to me
the declarations of their variables has a symbol like character
i.e

Code:
dim r%,s%
dim s$


i know some of you know this, can anyone tell me?, i just wanted to know..

How To Insert Symbols Into Vb6
hi
i want know how can i put symbols in vb6 in textbox like √ i read from recoredset to textbox symbol the textbox show to me ? i try with rich textbox
but it is seem problem .

Greater Than (&gt;) Less Than (&lt;) Symbols
I am trying to use a formula that contain greater or less than. I am using the ">" and "<" symbols, are thses correct as it does not work.

If I use = and it is o.k.

Royxyz.

Inserting Symbols
Fellas,

Word processors such as word have a Insertion Entry called Symbol that then allows the user to pick a particular symbol, such as '(C)' copyright...

Does anyone know of a method or control that does this by any chance?

International ( , && . ) Symbols
Hi,

I have this program running well with regional US settings. It is not running when changing to a setting, which uses a comma (,) for decimal separation.

There are some calculation going on with user input. In fact I have a VBA version and a VB6 version of the program. Both having the same problem.

So, I think it is related to the decimal separator. Does anyone have some ideas, what the normal procedure is to prevent this problem?
Does it matter if I compile with a certain regional setting?

Joner

Mathematical Symbols
anyone have any ideas or methods on having vb print things like integral signs or other mathematical notations on something like a form or picbox?
mael

Maths Symbols
I have downloaded MathType for Windows version 5.0 application which can be used with MSword and it has very vast set of symbols. How van i use it in Vb6.0

Counting Symbols And Such
ok im trying to make a program that will count the symbols for a game code. The code looks alot like vb. The symbols im talking about would be like SetActorFlags(player, 0x80); And so the SetActorFlags would be one symbol, player would be another, and 0x80 would be the last one. These symbols can be anything or any length say it could be somthing like this ClearThingFlags(thereallystupidguy, GetsenderRef(player), Victim, 0x100); And I would want to get the ClearThingFlags, thereallystupidguy, GetsenderRef, player, victim, and 0x100 all added up so it would say that that line has 6 symbols. where as a line like if(getThingFlags(victim) && 0x100) would only have 3 symbols in it because things like if, for, and while are not included in the charactor counting. I really hope there is some way to do this but here is just alittle more of what im trying to do.

if(VectorSub(VectorVel(Vector('0 0 0'))), player, billy != w + b)
{
destroyThing(bobby);
GetThingSource();
}

that whole thing would have 11 symbols VectorSub, VectorVel, Vector, '0 0 0', player, billy, w, b, destroything, GetThingSource, and bobby. the rest would not be counted. or somthing like this throws in a damper to what im trying to do
Print("billy, is SetThingFlags(www, massassi); victim"); and that would only have 2 symbols print and "billy, is SetThingFlags(www, massassi); victim" cause it is in qutation. No to refresh on what im trying to do, Im trying to make a program that will count the number of symbols in a single line of this type of code while still following the rules like if's are not counted and somthing like if(player != victim) would only be counted as 2 symbols (player, victim). Can it be done?

No Symbols Loaded...
Hi,
I have this project that i'm working on. (in VB .NET)
whenever I run it, the following messages come in the output window... even
though the application runs perfect.
Any ideas????

'Scoring Model': Loaded 'C:Scoring ModelinIFCI Risk Scoring Model.exe',
Symbols loaded.
'Scoring Model.exe': Loaded 'c:
winntassemblygacsystem.windows.forms1.0.3300. 0__b77a5c561934e089system.windows.forms.dll',

No symbols loaded.
'Scoring Model.exe': Loaded 'c:
winntassemblygacsystem1.0.3300.0__b77a5c56193 4e089system.dll', No
symbols loaded.
'Scoring Model.exe': Loaded 'c:
winntassemblygacsystem.drawing1.0.3300.0__b03 f5f7f11d50a3asystem.drawing.dll',

No symbols loaded.
'Scoring Model.exe': Loaded 'c:
winntassemblygacaccessibility1.0.3300.0__b03f 5f7f11d50a3aaccessibility.dll',

No symbols loaded.
'Scoring Model.exe': Loaded 'c:
isk scoring
modelinaxinterop.msflexgridlib.dll', No symbols loaded.
'Scoring Model.exe': Loaded 'c:scoring
modelininterop.msflexgridlib.dll', No symbols loaded.
'Scoring Model.exe': Loaded 'c:
isk scoring modelininterop.excel.dll',
No symbols loaded.
'Scoring Model.exe': Loaded 'c:
isk scoring
modelininterop.microsoft.office.core.dll', No symbols loaded.
'Scoring Model.exe': Loaded 'c:
winntassemblygacmicrosoft.visualbasic7.0.3300 .0__b03f5f7f11d50a3amicrosoft.visualbasic.dll',

No symbols loaded.



Regards,



===========
Yuvraj Bahri
ICRA Ltd.
4th Floor, Kailash Building,
26, K.G. Marg,
New Delhi - 110 001
Ph: 3357940-50, Extn. - 311
Fax: 3357014
Email: email@removed
email@removed
Web-site: www.icra-advisory.com
===========================

Word And Symbols -- VB Bug?
Since my previous post was unclear, below is an example of a macro showing that Word does not behave properly when dealing with symbols.

Anyone knowing how to get around this "bug"?

Many thanks in advance for replies!
e.

Sub puzzling()
    
    Selection.InsertSymbol Font:="Symbol", CharacterNumber:=-3999, Unicode:=True
    Selection.MoveLeft wdCharacter, , wdExtend
    Set s1 = Selection.FormattedText
    Selection.Collapse
    Selection.InsertSymbol Font:="Symbol", CharacterNumber:=-3999, Unicode:=True
    Selection.MoveLeft wdCharacter, , wdExtend
    Set s2 = Selection.FormattedText
    MsgBox s1.IsEqual(s2)

    Selection = "A"
    Selection.MoveLeft wdCharacter, , wdExtend
    Set s1 = Selection.FormattedText
    Selection.Collapse
    Selection = "A"
    Selection.MoveLeft wdCharacter, , wdExtend
    Set s2 = Selection.FormattedText
    MsgBox s1.IsEqual(s2)


End Sub

Math Symbols
hi
i was trying to write maths symbols like alpha sigma and other mathes symbol
those symbols i want to show on the form and not able to do it.
if someone knows pl. tell me
thanks
Swati

Using Microsoft Office Symbols In Vb
hi i need to use symbols given in office in my vb application. i want to use thwm as button caption. any help wud be welcumed.

Dynamical Symbols In Treeview
Hi all!

I've developed a kind of an explorer. Now I want to insert symbols like a folder-, disk-, My Computer-symbol, etc. dynamically. Up to today I created a ImageList with all the symbols in it. What I'm trying to achieve is to fill the symbols dynamically from shell32.dll. In that way I get different symbols for different OS - each user gets what he's used to...
> does anyone knows help?

Is there a better control for Images like imagelist...?

thanks in advance.

Jens

Symbols To Represent Types
I know this is elementry, but I've seen it done and still don't quite have a grasp on it. And I'm totally at a loss to what search engine terms I should use to find the info.

Can someone please list the variable type symbols used to declare or cast variables that are put at the end of the variable name.

Eg. I think Variable& means long right? Or cast to long etc.

Is this some sort of legacy brought by VB5 or something or is this just another way to say CLng(Variable) to cast. Or is it just like "(long) variable" in C.

Anyways, a list of all the symbols and types would be much appreciated!

Symbols Appear On Form For No Reason?!?!
Hi All

I have just opened up a program I completed today on another computer and it is opening a particular form with weird symbols across the top of it. I have never seen this before, the symbols weren't there when I compiled it or tested it on the other pc and now they are there. The pc's are both running Win XP.
I've attached the picture for your to view it:

It would be greatly appreciated if you could get back to me quickly, thanks.

Trouble Reading Symbols.....
My program scrambles the file, when i try to read one line in from this file(Wjtvbm!D,,!Cppl) it will only read in Wjtvbm!D. How can I make it read the , character? I declared the cariable that holds this as a string but it stops reading once it finds the , character. How can I read this character in too?
Thank You

Prevent Symbols To Be Put In An Input Box?
The titles says it all.What are the methods i can use and can you help me?
Can i do it by messing around with KeyPress?

Thanks.

SQL Operator Symbols In Enumeration
i'm writing a simple sql class, and was wondering if its possible to put the common sql operators (< > = like % etc) into an enumeration.

The symbols alone won't work, neither will the symbols wrapped in quotes, and i even tried eg: chr(60) = 1 in the enum, but its having none of it. The alternative is to let the user pass the operator as an argument of the function, but i'd prefer to limit the usage with an enumeration. Does anyone know if this is possible?

Copyright 2005-08 www.BigResource.com, All rights reserved