473,395 Members | 1,556 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,395 software developers and data experts.

oo40 - number type and ODynaset

ak
Hi!

I have a dynaset from a select string and want
to insert a bunch of values into the columns/fields.

Some of the columns are of type number afaik e.g.
number(3) meaning only 3 digits are allowed.

I am not quite sure how to do the approp conversion
having the types integer, short etc in my program to
the type 'number' column. It seems I get an error by the
dynaset update everytime a number is larger than the
allowed size.

Is the size independent of the actual argument datatype
to the SetFieldValue or is the size only in regard to number
of digits?

Is there some way to make sure that the value
fits into the field when doing the SetFieldValue so
that the update always succeeds? I would like to keep
the constraints as that seems to be the only check
on that correct values are written in the table.

tia
/ak

PS. Is there any gottcha when it comes to using
the field index instead of the actual name (SetFieldValue( 3,
or SetFieldValue( "SOMECOL", ?When I do the former one
I get no error when I do Update but on the other hand nothing
is written. ;p

env: vc6, oracle8, oo40, running in seperate thread
int aValue = 12;
long bValue = 121242;

dyn.Open( db, "select * from sometable" );
dyn.SetFieldValue( "SomeNumber", aValue );
dyn.SetFieldValue( "Someother", bValue );
....
dyn.Update() fails due to constraints on one of the
Number columns. (annoying not know which until
update)
Jul 19 '05 #1
0 1941

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

Similar topics

21
by: Gavin | last post by:
Hi, I'm a newbie to programming of any kind. I have posted this to other groups in a hope to get a response from anyone. Can any one tell me how to make my VB program read the Bios serial number...
122
by: Einar | last post by:
Hi, I wonder if there is a nice bit twiddling hack to compare a large number of variables? If you first store them in an array, you can do: for (i = 0; i < n; i++) { if (array != value) {...
10
by: chanma | last post by:
code1:var x=0xf0000000; alert(x); output:4026531840 code2:var b=0xf<<28; alert(b); output:-268435456
28
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I convert a Number into a String with exactly 2 decimal places?...
73
by: cesco | last post by:
I have to generate a list of N random numbers (integer) whose sum is equal to M. If, for example, I have to generate 5 random numbers whose sum is 50 a possible solution could be . Is there a...
9
by: =?Utf-8?B?TWlrZTk5MDA=?= | last post by:
I save a number in the table and want to get that number again, but the number I get has lower precision than I expect. For example, when I divide 10/3 I get 3.3333333333333335 if the variable is...
1
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - Why does 1+1 equal 11? or How do I convert a string to a number?...
11
by: davidj411 | last post by:
i am parsing a cell phone bill to get a list of all numbers and the total talktime spend on each number. i already have a unique list of the phone numbers. now i must go through the list of...
0
by: ak | last post by:
Hi! I have a dynaset from a select string and want to insert a bunch of values into the columns/fields. Some of the columns are of type number afaik e.g. number(3) meaning only 3 digits are...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...

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.