Data Access Worldwide Forums
 

Go Back   Data Access Worldwide Forums > Blogs

Notices

Old

Sequential Reading Data

Posted 20-Aug-2010 at 01:00 AM by Vincent Oorsprong (Development Team Blog)

We all know DataFlex is a great product to build database applications, most of the data will be entered by end-users and printed or otherwise processed. But what if you need to import data from other manufacturers? What do we have to do?

Sequential I/O commands
When we want to read data in a DataFlex application we can make a choice between the commands Read, ReadLn, Read_Block and Read_Hex. Of course before you can read the input stream (usually a file) needs to be opened...
Vincent Oorsprong's Avatar
DAW Training & Support
Views 135 Comments 0 Vincent Oorsprong is online now
Old

How to change the internet connection timeout

Posted 17-Aug-2010 at 01:00 AM by Vincent Oorsprong (Development Team Blog)

When your Visual DataFlex application makes an external call to a webservice the main program waits for its completion. If the request does not return immediately several things can be the cause. Your connection to your ISP can slow, the webserver you try to reach is busy, can be difficult found etc. If you want your application to continue as soon as possible and know (and this is they unknown keyfactor) that particular call should not take more than a couple of milliseconds to complete you can...
Vincent Oorsprong's Avatar
DAW Training & Support
Views 133 Comments 0 Vincent Oorsprong is online now
Old

Programmatically find out if UAC is turned ON

Posted 15-Aug-2010 at 03:14 AM by Vincent Oorsprong (Development Team Blog)

UAC, short for User Access Control, the feature built in Microsoft Windows Vista and higher is turned off by a number of users and developers because they do not like that the operating system asks for permission to write or access certain areas of their environment. Building your applications you are however advised not to do this because sooner or later you will install your not UAC compliant application at a UAC controlled PC and that is not goo.

How can you find out if UAC is...
Vincent Oorsprong's Avatar
DAW Training & Support
Views 111 Comments 0 Vincent Oorsprong is online now
Old

Changing Fonts of the new CJ Grid control

Posted 27-May-2010 at 12:34 PM by John van Houten (Development Team Blog)

The new Visual DataFlex grid classes in Visual DataFlex 16.0 (cCJGrid, cDbCJGrid, etc) do not expose an interface for setting the grid control's various Fonts. This turned out to be beyond the scope for the VDF 16.0 project, however it is still possible to set all of the control's fonts via the COM interface.

For example here is how you can modify the default Font used to display data in the Grid's cells: You would write the following event handler in your grid object...
...
John van Houten's Avatar
Data Access Worldwide
Views 557 Comments 0 John van Houten is offline
Old

Transferring large strings with web services

Posted 26-May-2010 at 08:00 AM by Sonny Falk (Development Team Blog)

The other day I received an interesting question from a developer about argument_size and web services. Specifically he wanted to create a web service in VDF that accepts a file attachment along with some other metadata for the file. It would look something like this (actual code modified for brevity):

Code:
Struct tAttachment
    String fileName
    String comment
    ...
    String fileContent
End_Struct

...

{ Published
...
Data Access Worldwide
Views 389 Comments 3 Sonny Falk is offline
Old

The other side of External_Function

Posted 18-May-2010 at 08:00 AM by Sonny Falk (Development Team Blog)

We're continuing the back to the basics theme for advanced VDF developers by visiting the other side of External_Function. If you haven't done so already, you should read the first part, it's a prerequisite for understanding what I'm about to talk about here.

Let's start with a simple DLL written in C++, exporting only one silly function SayHello(), which we'll call from our VDF program. The finished C++ project is attached at the end of this article, but we'll take it step by step....
Data Access Worldwide
Views 649 Comments 1 Sonny Falk is offline
Old

The New Grids - All About Rows and Columns

Posted 5-May-2010 at 05:23 PM by John Tuohy (Development Team Blog)
Tags grids

The information about row and column changing is still being documented. There are significant changes in the way the new grid works as compared to the old grids. Here is a summary that should help everyone get started.

Navigation consists of changing columns and changing rows. A navigation event consists of a row change and/or a column change. It is best to think of these as two events.

Column Change

When a column change occurs, events are sent to the...
Data Access Worldwide
Views 812 Comments 0 John Tuohy is online now
Old

Numeric masks and rounding, floating point values and conversions

Posted 3-May-2010 at 08:00 AM by Sonny Falk (Development Team Blog)

Frank is asking about a peculiar behavior with numeric masks and rounding, where it seemingly sometimes rounds the value to the specified number of decimals in the mask, but other times it seems to truncate instead. What's going on? Is this a bug?

Frank demonstrated the problem in an excellent manner using a tiny program like this:
Code:
Use DfAllEnt

Object oMain is a Panel
    Object oForm is a Form
        Set Size to 12 50
        Set
...
Data Access Worldwide
Views 458 Comments 2 Sonny Falk is offline
Old

Handling Connection Error in your Application

Posted 28-Apr-2010 at 08:00 AM by Marcia Booth (Development Team Blog)

When using one of the database Connectivity Kits, how can you make your program display its own error message when a connection string is not correct? By default, an error is displayed and the database will pop up a login dialog for users to enter their correct user and password. Or the application may display an unhandled error. Hmm... not what you want to see when using either the login command or SQLConnect method.


In order to have your application better handle those errors,...
Marcia Booth's Avatar
Data Access Worldwide
Views 448 Comments 4 Marcia Booth is offline
Old

In Praise of All Things Idle

Posted 26-Apr-2010 at 08:00 AM by John Tuohy (Development Team Blog)

Recent research has suggested that "devil" is actually an old fashioned spelling for "developer". While this does not entirely surprise me, I will leave the theological implication of this to others. What I would like to discuss is how this applies to the old adage "Idle hands are the devil’s workshop". Does this really refer to developers and, if so, how can we make idle hands or, more accurately idle handlers part of our workshop?

In Visual DataFlex...
Data Access Worldwide
Views 449 Comments 3 John Tuohy is online now
Old

How does External_Function really work?

Posted 22-Apr-2010 at 08:00 AM by Sonny Falk (Development Team Blog)

Let's take a closer look at External_Function. But first, there are currently two generic and well established technologies you can use from VDF to interact with external components, DLL functions and COM objects. Actually, there are several other techniques available as well, the obsolete and defunct DDE technology, and the more modern SOAP technology for example, and various other IPC mechanisms. But we'll ignore those for now.

DLL and COM are the two fundamental technologies for...
Data Access Worldwide
Views 521 Comments 0 Sonny Falk is offline
Old

The Case for Source Control

Posted 19-Apr-2010 at 02:18 PM by Dennis Piccioni (Development Team Blog)

Source Control has been discussed in our forums off and on for years and it appears that some developers are not convinced that using it will benefit them. If you are not currently using source control, you should seriously reconsider doing so. I hope this article clears up most questions you have.

Source control is often also referred to as "version control" or "revision control". I prefer the term source control because it does so much more than simply tracking...
Dennis Piccioni's Avatar
Data Access Worldwide
Views 486 Comments 10 Dennis Piccioni is offline
Old

Converting a String to Char[]

Posted 14-Apr-2010 at 08:00 AM by Sonny Falk (Development Team Blog)

In the last article I mentioned that the Address type can be used to efficiently copy a Char[] containing a null terminated C string to a VDF String, and I also mentioned that it works the other way around. A follow-up question I received (and should have predicted) was about exactly how you can do that.

Basically, the task is to quickly and efficiently copy a VDF String to a Char[]. The first solution one might come up with is to loop through the characters in the string and assign...
Data Access Worldwide
Views 338 Comments 0 Sonny Falk is offline
Old

Address and Pointer, what's up with that?

Posted 1-Apr-2010 at 08:00 AM by Sonny Falk (Development Team Blog)

If you've been a VDF developer for a while you've undoubtedly come across Pointer, but what about the Address type? Isn't that just redundant?

Pointer has been around seemingly forever, but you may or may not know that Pointer is not a real data type in its own right. If you type Pointer in the Visual DataFlex Studio editor and hover your mouse cursor over the word, you'll see a tooltip that says "Alias type Pointer Integer". So even though it's been around for so long,...
Data Access Worldwide
Views 395 Comments 2 Sonny Falk is offline
Old

Adjusting your XML Application to use Namespace and XML Schema Validation

Posted 25-Mar-2010 at 08:34 AM by Marcia Booth (Development Team Blog)

In order to update our Samples to use the new XML methods (*NS methods) and schema validation, I had to go through some steps to get it all working. I thought it would be beneficial to document what I have done and share what I have learned while converting the samples -- so here I am.

Note that these changes are not required for applications to be migrated to Visual DataFlex 15.1, but namespaces can play a vital role in a data integration project or data exchange scenario, where...
Marcia Booth's Avatar
Data Access Worldwide
Views 511 Comments 0 Marcia Booth is offline
Old

Diagnosing Studio and compile time performance problems

Posted 22-Mar-2010 at 08:00 AM by Sonny Falk (Development Team Blog)
Updated 17-Mar-2010 at 05:25 PM by Sonny Falk

When it comes to performance working in the Studio as a developer, as opposed to running the application, there are generally two performance critical areas. The first one is the Studio Parser, which is the foundation for CodeSense, Visual Modeling, Go-To-Definition and more. The second performance critical area is when compiling. Unnecessarily long and slow compile times can make for a very frustrating experience working with the Visual DataFlex Studio.

Sometimes you may not even...
Data Access Worldwide
Views 473 Comments 0 Sonny Falk is offline
Old

AddressOf() does/did not work as expected with String[]

Posted 15-Mar-2010 at 09:00 AM by Sonny Falk (Development Team Blog)

A while ago I received a question about why the following code is not working as expected:

Code:
String[] listData
...
Move (SendMessage(hWnd, LB_ADDSTRING, 0, AddressOf(listData[iIndex]))) to iRetval
It's a little tricky, but the code is expecting a pointer to a null terminated C-style string. And usually AddressOf() will produce that with a local string variable. But in this case AddressOf() actually returns a pointer to the iIndex'th element...
Data Access Worldwide
Views 296 Comments 1 Sonny Falk is offline
Old

Developer Resources: Getting the Most from the Forums

Posted 8-Mar-2010 at 12:32 PM by Dennis Piccioni (Development Team Blog)
Updated 26-Mar-2010 at 12:56 PM by Dennis Piccioni

Our forums are chock full of information and we want to make sure that everyone can make the most of this.

Post all relevant information

Sometimes the operating system on which you encounter a problem matters, sometimes it does not, sometimes other product versions matter. By providing all the pertinent information from the get-go, it allows people who read your posts to better help you and not have to guess. At minimum, I would suggest that you provide the following...
Dennis Piccioni's Avatar
Data Access Worldwide
Views 340 Comments 0 Dennis Piccioni is offline
Old

Developer Resources: Finding Information

Posted 22-Feb-2010 at 01:22 PM by Dennis Piccioni (Development Team Blog)
Tags doc, find, info, kbase, search

A big part of our job as software developers is knowing lots of detailed information, but I would argue that knowing how to find information when you need it is even more important. So here is an assortment of resources and tips for Visual DataFlex developers. I use just about all of these resources on a daily basis:
...
Dennis Piccioni's Avatar
Data Access Worldwide
Views 478 Comments 1 Dennis Piccioni is offline
Old

The secret NewRecord command

Posted 8-Feb-2010 at 09:00 AM by Sonny Falk (Development Team Blog)
Tags code, newrecord

A well known old trick in DataFlex is the Move 0 to Recnum trick. It's been used with character mode DataFlex and Visual DataFlex for so long that nobody probably remembers where it came from, and I'm not sure it was ever really a documented or intended feature in the beginning. Nonetheless it became a fully supported technique at some point.

Basically, if you ever wanted to create a new record loosely based on data from an existing record, you could use this trick to simplify code...
Data Access Worldwide
Views 1079 Comments 6 Sonny Falk is offline

All times are GMT -5. The time now is 12:45 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright © 2009 Data Access Corporation. All Rights Reserved.