473,569 Members | 2,762 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access Import to Pervasive/Btrieve table

1 New Member
I currently receive text files that need to be manipulated into a suitable format for uploading into a Pervasive/Btrieve datafile. The text file I receive needs a number of steps to clean it up and so I set up an Access database to perform all the steps and would like to link the output directly to the database table rather than exporting to text and manually importing into the pervasive database table.

I have linked the pervasive data table through an ODBC connection, but I now have an issue where the output being imported into the data file is including the trailing blanks. Example is that the Data file field is a zstring 7, the data imported could be 4 or 5 in length, but on examination of the data file, the field shows the data with 2 or 3 trailing blanks on a key field. The database cannot be altered as it is part of a larger software package.

I use the following sql statement inside of the VB code to do this
[code]
DoCmd.RunSQL sqlstr
sqlstr = " INSERT INTO ZAgents ( Code, Agree_No, Distrib_Date, Distrib_Status, Title)
SELECT NewDMS.Code, rtrim(NewDMS.Co de), NewDMS.Date1, NewDMS.Status, NewDMS.Title
FROM NewDMS;"
DoCmd.RunSQL sqlstr
[code]

This is only part of a larger insert statement and as you can see, I have tried "TRIM" and "RTRIM" but neither work.

Any help or directions where I can research will greatly appreciated.
Dec 5 '06 #1
2 3656
MMcCarthy
14,534 Recognized Expert Moderator MVP
You could try

Expand|Select|Wrap|Line Numbers
  1. Left(NewDMS.Code, Len(NewDMS.Code))
Expand|Select|Wrap|Line Numbers
  1. Right(NewDMS.Code, Len(NewDMS.Code))
However, I think your problem lies in the parsing of the code and the odbc connection may not be up to the job. As I don't know anything about Pervasive/Btrieve datafiles I can't help further.

I currently receive text files that need to be manipulated into a suitable format for uploading into a Pervasive/Btrieve datafile. The text file I receive needs a number of steps to clean it up and so I set up an Access database to perform all the steps and would like to link the output directly to the database table rather than exporting to text and manually importing into the pervasive database table.

I have linked the pervasive data table through an ODBC connection, but I now have an issue where the output being imported into the data file is including the trailing blanks. Example is that the Data file field is a zstring 7, the data imported could be 4 or 5 in length, but on examination of the data file, the field shows the data with 2 or 3 trailing blanks on a key field. The database cannot be altered as it is part of a larger software package.

I use the following sql statement inside of the VB code to do this
[code]
DoCmd.RunSQL sqlstr
sqlstr = " INSERT INTO ZAgents ( Code, Agree_No, Distrib_Date, Distrib_Status, Title)
SELECT NewDMS.Code, rtrim(NewDMS.Co de), NewDMS.Date1, NewDMS.Status, NewDMS.Title
FROM NewDMS;"
DoCmd.RunSQL sqlstr
[code]

This is only part of a larger insert statement and as you can see, I have tried "TRIM" and "RTRIM" but neither work.

Any help or directions where I can research will greatly appreciated.
Dec 5 '06 #2
NeoPa
32,564 Recognized Expert Moderator MVP
I too feel that you've hit a limitation of the BTrieve ODBC connection.
You could try appending Char(0) to the end of the string.
If it's a C code library interface (Dim distant memory BTrieve was associated with C) then that will probably work for you.
If it does then you should create a function because all strings passed will need to be processed in the same way.
Dec 5 '06 #3

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

Similar topics

5
3676
by: Chuy | last post by:
I am using Maximizer Enterprise 8.0 as my companies CRM solution. Currently we are using the included Pervasive SQL that shipps with the product. Is there someone out that who could tell me if there are any performance benefits to switching the Pervasive Engine with a Microsoft SQL engine. Regards Jesus
2
2782
by: Martin Marques | last post by:
Is there a possibility to export Btrieve DB files into postgres ?? Any links with information on the respect? -- 10:17:02 up 8 days, 2:07, 4 users, load average: 1.83, 1.13, 0.84 ----------------------------------------------------------------- Martín Marqués | mmarques@unl.edu.ar Programador, Administrador,...
22
3285
by: Marc Mones | last post by:
Hello, I'working with IBM DB2 V8.1 and CLI/ODBC. I've got a problem with the following statement: ******************************************************************************** SELECT S_ART, S_SPRACHE, S_MANDANT, S_NR, S_SUB, S_OWNER, S_SATZ FROM SY0001_00005 WHERE S_ART = ? AND S_SPRACHE = ? AND S_MANDANT = ? AND S_NR = ? AND
0
3669
by: Classic Software, Inc. | last post by:
Need to get some Pervasive SQL or Btrieve data into a Microsoft Access database? For those needing to do so, we sell a very useful tool for Btrieve and Pervasive SQL Databases. Has an explorer type interface. Lets you browse and edit your Btrieve and Pervasive SQL database DDF and data files. Lets you see everything as it's native type or...
0
2446
by: Classic Software, Inc. | last post by:
If you are looking for a tool to go from Btrieve to Microsoft Access (or anything else): Data Manager for Btrieve and pervasive SQL. Standard and Enterprise versions. http://www.classicsoftware.com http://www.classicsoftware.com/prod09.htm
0
2627
by: JSwinney | last post by:
Greetings! I know this kind of question gets asked here almost daily, but as a newbie I have sort of a twist: I'm needing to take some reports I've written in Access that link to Btrieve files thru an ODBC connection, and create a run time app using Office Developer's Edition so that my customers can run the reports using the native...
3
6898
by: Gheaci Maschl | last post by:
Hi all! I would like to have your opinion about my problem and my proposal how to solve it: Ingredients: - BTriev database - Crystal Reports - maybe MS Access - Liinos6 (small ERP software)
7
2872
by: bryant | last post by:
Hi all. I am new to ASP and working in Expression Web. The following query displays the information I need in the gridview for a single record. SELECT "OE_HDR"."ORD_NO", "OE_HDR"."CUST_NAM", "OE_HDR"."SLS_MAN_NO", "OE_HDR"."SLS_MAN_INITIALS", "OE_HDR"."ORD_DAT", "OE_HDR"."SHIP_DAT" FROM "OE_HDR" WHERE ("OE_HDR"."ORD_NO"='174310') I...
1
2393
by: bailiss | last post by:
I am trying to save the " (inch mark) and ' (foot mark) into a database. I am not using MySQL regrettably. Instead, I have to use a Pervasive SQL database, version 8.5. The user is supposed to enter the height a plant normally grows to. An acceptable answer may be 6'. I have a textbox for the number and use JavaScript to verify it is a...
0
7694
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
7921
Oralloy
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. ...
1
7666
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
7964
tracyyun
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...
0
6278
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
5504
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
3651
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...
1
2107
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
1
1208
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.