473,549 Members | 2,584 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

newbe at vb am an old fortran grammer

1 New Member
what is some normal code syntax to load an array from my access format (data1 ctl) db?
this is my first try at vb...i like its construction.

I generated a db named pooldata.mdb all fields are text.
thanks in advance!!!
Sep 10 '06 #1
1 1187
miffe
7 New Member
I suggest you open a connection to the database using the data control first of all, then run an SQL command using the recordset property of the data control, with the SQL command you can get a result query of the names or data you need.

You then can load the info into the array. First of all create the array in the General Declarations part,

Dim array (idClient, Number, Name)

then just run a loop to read the data from the SQL result query into the array, I'm not sure of the exact code but it should be generally simple. You could use ADO which would be easier.

data1.recordset .movefirst
Do
data1.recordset .movenext
'etc
array (... , ... , ... ) = whatever
While Data1.EOF = false

It's quite simple, altough if you want a detailed code I suggest you look for VB/Access tutorials in Google. In my opinion dont use DAO/ADO, use direct SQL queries and the result's to manage your DB.
Sep 11 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

44
3367
by: Carl | last post by:
"Nine Language Performance Round-up: Benchmarking Math & File I/O" http://www.osnews.com/story.php?news_id=5602 I think this is an unfair comparison! I wouldn't dream of developing a numerical application in Python without using prebuilt numerical libraries and data objects such as dictionaries and lists. I have been experimenting with...
15
2080
by: Nick Coghlan | last post by:
Thought some folks here might find this one interesting. No great revelations, just a fairly sensible piece on writing readable code :) The whole article: http://www.acmqueue.com/modules.php?name=Content&pa=showpage&pid=271&page=1 The section specifically on white space:...
4
2847
by: NM | last post by:
Hello All I am writing some progam that involves both C++ and Fortran. Some of the existing code is in Fortran. The main program will be in C++ and it will call some Fortran subroutine. All the memory allocation has to be done in C++. For arrays of structures and arrays (including multi-dimensional array) of primitive data types declared...
1
6400
by: Sam | last post by:
Hello all I have a two dimensional array (the dimensions are not known) that needs to be passed to fortran from c++, allocate the dimensions of the array in fortran code, do some filling up of the array in fortran and then accessing it in my c++ code. Say in my c++ code I have; extern "C" { void foo_(float **, int &, int &); }
2
3314
by: NM | last post by:
Hello all, I am supposed to do some mixed programming with c++ and fortran. I was succeeful in exchanging the 2D arrays from fortran to c++ and the other way, but was unable to that same with the 3D arrays, the values passed are not all the same. I am also pasting the fortran and c++ codes so that you could have a look at them. ////C++...
11
8620
by: John Smith | last post by:
Ok, I know this is a common topic, but I didn't find any post that solves my current problem. I'm using Microsoft Visual C++ 6.0 (SP5), and Intel Fortran 7.1 Compiler for Windows. I'm trying to pass a C character string to my Fortran code. Here is the code (a very simple one): ********** C print.c listing ********** #include <stdio.h>
81
7235
by: Matt | last post by:
I have 2 questions: 1. strlen returns an unsigned (size_t) quantity. Why is an unsigned value more approprate than a signed value? Why is unsighned value less appropriate? 2. Would there be any advantage in having strcat and strcpy return a pointer to the "end" of the destination string rather than returning a
1
1309
by: Paramveer.Singh | last post by:
hi! I tried to extend the grammer for plpgsql by editing postgresql-7.4.3/src/pl/plpgsql/src/gram.y but as soon as you compile it (even without any changes) it gives an error user$ make bison -y -d gram.y
0
1018
by: Gridlock | last post by:
I just started to use this, and am trying to figure out how to set up a generic string parameter in the grammer file. There are many grammer items like integer and others, but I can't find a generic string parameter. Anyone? Thanks much
17
2691
by: Eric_Dexter | last post by:
def simplecsdtoorc(filename): file = open(filename,"r") alllines = file.read_until("</CsInstruments>") pattern1 = re.compile("</") orcfilename = filename + "orc" for line in alllines: if not pattern1 print >>orcfilename, line I am pretty sure my code isn't close to what I want. I need to be able
0
7526
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7457
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...
0
7965
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7483
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6051
agi2029
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...
1
5375
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3487
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1949
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
0
771
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.