I often read a recordset (ADO) into a variant array so that the array can
contain text, currency, boolean, etc. VB.Net does not allow variants and the
object type gives errors during conversion from VB6. To complicate matters,
I also like to make the array 2 dimensions so I can put multiple records into
the array. This is a great way to pass recordset info in/out of a
subroutine, but now it does not work.
Any help most apreciated. 2 2397
how about array of structure. I have not used it but I am sure you look at
easily from vstudio help or msdn or Google.
a structure can have a combination of various data types as well as arrays
too.
"louis" <lo***@discussi ons.microsoft.c om> wrote in message
news:93******** *************** ***********@mic rosoft.com... I often read a recordset (ADO) into a variant array so that the array can contain text, currency, boolean, etc. VB.Net does not allow variants and the object type gives errors during conversion from VB6. To complicate matters, I also like to make the array 2 dimensions so I can put multiple records into the array. This is a great way to pass recordset info in/out of a subroutine, but now it does not work. Any help most apreciated.
Looked at the structure - could not find an example of using this with arrays?
Would you just dim "CustName() as string" inside the structure? There is no
way to know how many dimensions would be needed at design time.
"gg" wrote: how about array of structure. I have not used it but I am sure you look at easily from vstudio help or msdn or Google.
a structure can have a combination of various data types as well as arrays too.
"louis" <lo***@discussi ons.microsoft.c om> wrote in message news:93******** *************** ***********@mic rosoft.com...I often read a recordset (ADO) into a variant array so that the array can contain text, currency, boolean, etc. VB.Net does not allow variants and the object type gives errors during conversion from VB6. To complicate matters, I also like to make the array 2 dimensions so I can put multiple records into the array. This is a great way to pass recordset info in/out of a subroutine, but now it does not work. Any help most apreciated. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Rob Meade |
last post by:
Lo all,
Ok - this is what I was aiming to do, and then I thought - naahhh, that cant
be right!
query database
results to recordset
results to array using GetRows
update values in one column in array
<BOING>
|
by: Vic |
last post by:
Hi all!
I'm trying to create a DLL in C++ that calls an EXE containing a COM
component.
I load the component and call to it's methods using the IDispatch
interface, it works correctly until I try to call a method with the
signature:
method(long, BSTR, VARIANT*)
|
by: sathya.krishnamurthy |
last post by:
Hello Everybody
I have an C++ COM DLL with the following implementation.
__interface ICPM : IDispatch
{
HRESULT GlobalComputeClass ( VARIANT *inArr, double
*pval);
}
|
by: Paul M. Cook |
last post by:
Let's say you have a CSV file and you load it into a variant array using the
split function on VBCrLF. Then you load a variable with the line count and
loop through the array for 0 to line count. This works well unless you have
blank lines at the end of the CSV file. Now if you process the loop, you'll
get an out of bounds subscript at the end of the loop because you are
referencing null values at the end of the variant array.
How...
|
by: rolandheller |
last post by:
Hello!
We're currently looking at migrating some of our code to .NET. Our old
application written in VB6 has a DLL function that passes an Array of
Variants to another function. We're planning to put a Web Service as a
bridge to unglue the 3-tier architecture ...
so old:
VB6 -> Array(variants) -> VB6
| |
by: dwinson |
last post by:
I am writing an add-in in C# for a server written in VB6.
In order for my add-in to work I need to implement this method:
MyMethod(string inputData)
.... so my C# code looks like this:
public object MyMethod(string inputData)...
I wrote a test harness in VB6 to test the method. I can call the method
|
by: RB Smissaert |
last post by:
Would it be possible to have a worthwile speed gain by
making a C++ dll that can sort a variant 2-D array, supplied by VB/VBA?
If it helps the sort column will nearly always be the first column and this
column will hold integer numbers.
Thanks for any advice.
RBS
|
by: buzzluck68 |
last post by:
Hello,
I am having trouble upgrading my VB apps to .net. When i started at
my company there was a dll created here in vb6, and i need to use that
dll for many functions that would take too much time to re-create for
the limit that i am given. I have to create a new app in .net, per my
instructions, but the dll uses variant arrays, and i keep getting an
error whenever i pass an object array from my .net app to the vb6 dll
which needs...
|
by: scubak1w1 |
last post by:
Hello,
For a project I am working on, I wrote a piece of code in VBA backend of Excel to convert RGB colour values to HSV...
The VBA is working fine, and as you can see at the bottom I am stuffing the three results generated into an array expressed (sic) as a variant...
The first value in the returned array, Hue, is dropped into the cell where the function is called (E2 in the attached screen shot..) - i.e., "=fntHSVtoRGB(E2,F2,G2)"
...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |