![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 10 of 14 total |
![]() |
Sun, Jun 28 2009 12:44 PM | Permanent Link |
David | Hi all,
I'm totally new to C/S database systems with D2009 so please go easy! I have my main form with a dataset and table that is initialised on FormCreate. [code] procedure Tform1.FormCreate(Sender: TObject); var SettingsIni, UsersIni: TIniFile; CurrentUsers: integer; begin BS1Ini := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'settings.ini'); with SettingsIni do begin mnuToolbar.checked := ReadBool('General', 'ViewToolbar', true); panelToolbar.visible := mnuToolbar.checked; mnuCompanyName.checked := ReadBool('General', 'ViewCompanyName', true); panelCompanyName.visible := mnuCompanyName.checked; mnuConfirmExit.checked := ReadBool('General', 'ViewConfirmExit', false); cboSystem.text := ReadString('General', 'System', 'AP'); if ParamStr(1) <> '' then strDatabaseName := ParamStr(1) //Command line parameter 1 (if present) = database name else strDatabaseName := ReadString('General', 'Database', ''); //Otherwise get from ini file (if specified there) if strDatabaseName = '' then strDatabaseName := ExtractFilePath(ParamStr(0)) + 'Data'; //Default: Set path for data files to be subdirectory "data" off program directory. eg. c:\My Program\Data end; SettingsIni.Free; try session.netfiledir := strDatabaseName; //Override path for BDE network control file. tblCompany.DatabaseName := strDatabaseName; tblCompany.Active := true; except //raise; Application.MessageBox(PChar('Database: ' + '''' + strDatabaseName + '''' + ' is not available.'), PChar(Application.Title), mb_OK + mb_DefButton1 + mb_IconStop); Application.Terminate; exit; end; [/code] On my development machine, everything wrks great, the database can be accessed and data manipulated. Whenever I deploy the program to another computer, I get the error Message "Database 'c:\<path>\data' not available error". Any Help would be appreciated as I have scoured this site and google and come up with a big fat load of nothing about my problem. |
Sun, Jun 28 2009 12:45 PM | Permanent Link |
David | I forgot to mention I'm using Paradox Tables!
-Dave |
Sun, Jun 28 2009 2:44 PM | Permanent Link |
"Rita" | "David" <david@davidmgilbert.com> wrote in message news:8815BE4E-0F51-4659-A67D-C367FA71A43A@news.elevatesoft.com... >I forgot to mention I'm using Paradox Tables! > Naughty boy this is the DBIsam group. On what machine is the server running and does your app know its IP ? Is it remote or local is the c:\data\ on the same machine as the server ? DBISam is a breeze to setup read the manual follow the instructions. Rita |
Sun, Jun 28 2009 2:46 PM | Permanent Link |
"Rita" | "Rita" <nospam@nospam> wrote in message news:D76845A2-AAEF-42E3-8869-74F96B738386@news.elevatesoft.com... Forgot dont u need the BDE for Paradox ? |
Sun, Jun 28 2009 2:56 PM | Permanent Link |
David | "Rita" wrote:
"Rita" <nospam@nospam> wrote in message news:D76845A2-AAEF-42E3-8869-74F96B738386@news.elevatesoft.com... Forgot dont u need the BDE for Paradox ? As I said this is my First Time using a C/S database environment in Delphi 2009 :blush: I was handed the code by a client for customization and I have made the rerquested changes, My only problem is that I cant get the compiled executable to run on any other machine than the machine I'm working on. I was under the Impression it was a DBISAM database system as I was Told by my client. Is there an easy way to upgrade the project to use DBISAM? Theres a good 80 or so formsn that i really dont want to mess with too much code wise. Any Help Appreciated, David |
Sun, Jun 28 2009 3:03 PM | Permanent Link |
David | Please excuse my typing errors, It's 4:30am :eek:
|
Sun, Jun 28 2009 3:34 PM | Permanent Link |
"Rita" | "David" <david@davidmgilbert.com> wrote in message news:5EDCBB18-215E-422A-9196-EFF7452023BA@news.elevatesoft.com... > > Is there an easy way to upgrade the project to use DBISAM? Theres a good > 80 or so formsn > that i really dont want to mess with too much code wise. > If it is a full blown BDE project then just convert all the tables using the tool that comes with DBIsam then use grep to replace all the TDB'S to Tdbisam simple really. Practice on a delphi demo try the MastApp it really is that simple. Gotchas could be SQL or tired like now. 80 forms easy with grep. Post a big unit here or send me one rl dot tipton at sky dot com Good Luck. |
Mon, Jun 29 2009 11:52 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | David,
<< Is there an easy way to upgrade the project to use DBISAM? Theres a good 80 or so formsn that i really dont want to mess with too much code wise. >> Something like GExperts will allow you to do a global search and replace on the forms so that you can change all T* BDE components to TDBISAM* DBISAM components. Of course, if you're using D5 or higher, you can just do a search and replace on the .dfm and .pas files directly because both are text. After that, you can use the BDE Database Transfer Utility that is provided as part of the DBISAM Additional Software and Utilities download to transfer the BDE database directly to DBISAM format. Here is a list of feature differences between the BDE and DBISAM that will help guide you in terms of any further code changes that would be necessary: http://www.elevatesoft.com/manual?action=manbdediff&id=dbisam4&product=d&version=7 -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Jun 29 2009 6:01 PM | Permanent Link |
David | Hi Tim,
Thanks for the Reply, I have got the databse and forms converted over however I am reveiving this blow error message on the folling code. Error Message: "Invalid Field Size" code is: procedure CreateTableCContact(strDatabase: string); begin with TDBISAMTable.create(nil) do try DatabaseName := strDatabase; TableName := 'CContact'; with FieldDefs do begin Clear; Add('CustomerID', ftInteger, 0, false); Add('ContactID', ftAutoInc, 0, false); Add('LastName', ftString, 30, false); Add('FirstName', ftString, 30, false); Add('JobTitle', ftString, 40, false); Add('BusinessPhone', ftString, 20, false); Add('BusinessPhoneExt', ftString, 10, false); Add('BusinessPhone2', ftString, 20, false); Add('BusinessPhone2Ext', ftString, 10, false); Add('HomePhone', ftString, 20, false); Add('Fax', ftString, 20, false); Add('Cellular', ftString, 20, false); Add('Pager', ftString, 20, false); Add('EMail', ftString, 30, false); Add('Notes', ftMemo, 240, false); end; with IndexDefs do begin //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< This is the line I get the break point on Clear; Add('', 'CustomerID;ContactID', [ixPrimary, ixUnique]); Add('FullName', 'LastName;FirstName', [ixCaseInsensitive]); Add('CustomerIDFullName', 'CustomerID;LastName;FirstName', [ixCaseInsensitive]); end; CreateTable; finally free; end; end; Thanks for all yours and Rita's Help -Dave |
Tue, Jun 30 2009 2:44 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | David
With something like that it's almost always the problem lies above the break point. Here is where DBSys is your friend - take an existing table, reverse engineer and have a look..... Add('_Notes',ftMemo,0,False,'','','','Free text notes'); ie ftMemo doesn't take a size Roy Lambert [Team Elevate] |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Wednesday, August 14, 2024 at 07:31 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |