create binary file

Results 1 to 2 of 2

Thread: create binary file

  1. #1
    Join Date
    Dec 1969

    Default create binary file

    I have written a script that read/writes to a file. At the <BR>present time, this is a text file. (It seems to work fine, never<BR>loses info, no problem.) But now I want to instead use a binary <BR>file - records. Working in C/C++ for the past 20 years I do all<BR>my file work with binary records. Those files I establish from<BR> the ground up using a file template, but JavaScript is far less<BR> control. According to my book, I must use MS Access to set up<BR>the file.<BR><BR>The MS Access programs I found retail upwards of $200.00! <BR><BR>Am I looking at the wrong thing? Or is there maybe something<BR> else out there that would serve to establish my file and WOULDN’T COST A KING’S RANSOM?<BR><BR>Another option is that you set up the file for me and e-mail it to me. How much work are we looking at here?<BR>

  2. #2
    Join Date
    Dec 1969

    Default Access != binary file

    Access is a *DATABASE*. And for your money you get a lot more than just a binary file system. You can also pick up a copy for a lot less than $200. I picked up a copy of Office97 (yes, from 1997) which included Access (and Excel and Word) for $50 on ****, for example. Sure, an older version. But it worked well for me.<BR><BR>But never mind.<BR><BR>You have several alternatives.<BR><BR>(1) You *can* program with an Access database without ever buying Access. The Microsoft "JET" drivers are included with Windows, and if you understand SQL then you can use the ODBC control panel to create an empty Access database and then use SQL commands from ASP to create tables, etc.<BR><BR>(2) There is a free database available. MySQL. It&#039;s quite popular and is even, in many ways, more powerful than Access. (For one thing, it&#039;s a true database *server*, which Access is not. It can handle dozens of users at the same time.) While it takes a bit more computer savvy to install it and set up users and databases, etc., than does Access, if you have 20 years of programming experience you should be able to handle it. is where you start. Look for a Windows installation binary. You will also need MyODBC, a "driver" that allows you to connect from ASP to ADO to MyODBC to MySQL. And you should look for a "gui-based" (graphical interface) program to set up databases, tables, etc. Unless you like command line interfaces, which is the default with MySQL.<BR><BR>(3) There is also SQL Server Express, which is a free download from MS and is a new replacement for MSDE (MicroSoft Desktop-database Engine), which was and still is free. These are both lightweight versions of the VERY powerful SQL Server. But they retain the full range of the SQL langauge supported by SQL Server, including Stored Procedures, and much more. They are limited to only a couple of simultaneous "connections", but if you only need to use this on your desktop, that&#039;s fine; likely you only need one connection.<BR><BR>SQL Server Express is a "beta" version that expires (and then you have to get the next beta version or the final version...I&#039;m not clear), so you might want to stick with the older but non-expiring MSDE. And neither come with any GUI-based interface (have to use just command line programs), though there are GUI-based programs out there that will work with them.<BR><BR><BR>************<BR><BR>For what it&#039;s worth, the reason you can&#039;t work with fixed length binary records easily from JS (or VBS) is that you don&#039;t really have control over how much data is *IN* a record. The biggest culprit are strings, which can be *any* size in JS and VBS, and you can&#039;t specify a fixed size. Granted, you could TAKE control, by checking that each and every string you add to a "record" does not exceed a known length, but it would be a royal pain to do so.<BR><BR>Besides, if you&#039;ve been programming 20 years, it really is way way past time to learn how to use databases.<BR><BR>So... Go download MySQL or MSDE or SQL Server Express and welcome to the 20th century. (I purposely did NOT say 21st century.)<BR><BR>Incidentally, I&#039;ve been programming 35 years, and yes, I remember doing binary "records" in "flat files." It worked. But it&#039;s truly an obsolete and clumsy way of doing things. If you can&#039;t tell, I&#039;m "hooked" on databases. I was fortunate to get hired by a database company back in 1987, which quickly got me past the days of flat files.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts