Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 8 of 8 total |
One-off DBISAM to SQL SERVER conversion |
Mon, Dec 9 2013 12:07 PM | Permanent Link |
Dominique Willems | I need to convert a DBISAM 3 DB to SQL SERVER. Just the one.
Where can I obtain the DBISAM 3 ODBC driver? Only found the version 4 one. Or is there another way? Converting to Access would be fine too, I guess. |
Mon, Dec 9 2013 12:14 PM | Permanent Link |
Raul Team Elevate | Where did you find it or are you referring to Elevate only selling v4 on
website? ODBC is a paid for product and if you buy the current version (v4) then you do get access to v3 as well. Alternative would be to just export the data (CSV or such) and then import into SQL. Raul On 12/9/2013 12:07 PM, Dominique Willems wrote: > I need to convert a DBISAM 3 DB to SQL SERVER. Just the one. > > Where can I obtain the DBISAM 3 ODBC driver? Only found the version 4 > one. > > Or is there another way? > > Converting to Access would be fine too, I guess. > |
Mon, Dec 9 2013 4:12 PM | Permanent Link |
Dominique Willems | Raul wrote:
> Alternative would be to just export the data (CSV or such) and then > import into SQL. I need BLOBs to be exported too. |
Mon, Dec 9 2013 4:22 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Dom,
<< Where can I obtain the DBISAM 3 ODBC driver? Only found the version 4 one. >> If you have purchased the DBISAM 4.x ODBC Driver, then you will be able to access the DBISAM 3.x ODBC Driver also. However, we only have the 4.x trial available on the web site for download. Tim Young Elevate Software www.elevatesoft.com |
Mon, Dec 9 2013 4:27 PM | Permanent Link |
Dominique Willems | Tim Young [Elevate Software] wrote:
> If you have purchased the DBISAM 4.x ODBC Driver, then you will be > able to access the DBISAM 3.x ODBC Driver also. However, we only > have the 4.x trial available on the web site for download. Thanks, Tim. Is there an easy link I can point a non-customer to, so that they can purchase and download the DBISAM 3 ODBC driver? |
Tue, Dec 10 2013 4:09 PM | Permanent Link |
Walter Matte Tactical Business Corporation | Here is a function that will export your data to Insert Statements. Compiles with XE.
It handles Blobs - saves them as Hex Binary Strings and Import into MSSQL. You may need to pay a bit with the date and time stuff... I just saved dates - you will see ... it is easy to do. Walter procedure TfrmMaintenance.btnExportClick(Sender: TObject); var OutFile : TextFile; i, j, iCnt : integer; fName, sLead, sInsert : string; LStr1, LStr2 : string; ST : TStringStream; begin inherited; iCnt := 0; SaveDialog1.InitialDir := GetPersonalFolder; SaveDialog1.Filename := edTable.Text + '.sql'; SaveDialog1.DefaultExt := 'sql'; SaveDialog1.Filter := '*.sql'; if SaveDialog1.Execute then begin if qHelp.Active then qHelp.Close; qHelp.Sql.Text := 'Select * from ' + edTable.Text; qHelp.Open; // SMExportToSQL1.FileName := SaveDialog1.FileName; // SMExportToSQL1.Execute; if FileExists(SaveDialog1.FileName) then DeleteFile(SaveDialog1.FileName); AssignFile(OutFile, SaveDialog1.FileName); ReWrite(OutFile); sLead := ' ('; sInsert := 'INSERT INTO [' + edTable.Text + '] ('; for i := 0 to qHelp.FieldDefs.Count - 1 do begin if i = 0 then sInsert := sInsert + '[' + qHelp.FieldDefs[i].Name + ']' else sInsert := sInsert + ', [' + qHelp.FieldDefs[i].Name + ']'; end; sInsert := sInsert + ')' + #13#10 + 'VALUES' + #13#10; qHelp.First; while not qHelp.EOF do begin inc(iCnt); lbCnt.Caption := IntToStr(iCnt); lbCnt.Update; write(OutFile,sInsert); for i := 0 to qHelp.FieldDefs.Count - 1 do begin { TFieldType = (ftUnknown, ftString, ftSmallint, ftInteger, ftWord, ftBoolean, ftFloat, ftCurrency, ftBCD, ftDate, ftTime, ftDateTime, ftBytes, ftVarBytes, ftAutoInc, ftBlob, ftMemo, ftGraphic, ftFmtMemo, ftParadoxOle, ftDBaseOle, ftTypedBinary, ftCursor); } write(OutFile,sLead); sLead := ', '; fName := qHelp.FieldDefs[i].Name; if qHelp.FieldByName(fname).IsNull then begin write(OutFile,'NULL'); end else begin case qHelp.FieldByName(fname).DataType of ftMemo, ftString : write(OutFile, 'N' + QuotedStr( qHelp.FieldByName(fName).asString)); ftBoolean : begin if qHelp.FieldByName(fName).asboolean then write(OutFile, 1) else write(OutFile, 0); end; ftInteger, ftSmallInt, ftWord, ftAutoInc : write(OutFile,qHelp.FieldByName(fName).asString); ftDate, ftDateTime, ftTime : write(OutFile,QuotedStr(FormatDateTime('yyyy-mm-dd', qHelp.FieldByName(fName).asDateTime))); ftFloat : write(OutFile,qHelp.FieldByName(fName).asString); ftCurrency : write(OutFile,Format('%0.02f', [qHelp.FieldByName(fName).asFloat])); ftBlob : begin ST := TStringStream.Create('',TEncoding.Unicode); TBlobField(qHelp.FieldByName(fName)).SaveToStream(ST); write(OutFile, '0x'); LStr1 := ST.DataString; SetLength(LStr2, Length(LStr1) * 4); BinToHex(LStr1[1],PWideChar(LStr2), Length(LStr1) * Sizeof(Char)); write(OutFile,LStr2); //for j := 1 to length(ST.DataString) do // write(OutFile, IntToHex(Ord(ST.DataString[j]),2)); ST.Free; end; else ShowMessage('Missing Datatype for Field = ' + fName); end; end; end; writeln(OutFile,')' + #13#10 + 'GO' + #13#10); sLead := '('; qHelp.Next; end; CloseFile(OutFile); qHelp.Close; MessageDlg('Saved', mtInformation, [mbOK], 0); lbCnt.Caption := '0'; end; end; |
Wed, Dec 11 2013 9:49 AM | Permanent Link |
Dominique Willems | Many thanks for that extensive reply!
It was kind of urgent, and they went the Scalabium route in the mean time. |
Mon, Dec 16 2013 8:43 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Dominique,
<< Thanks, Tim. Is there an easy link I can point a non-customer to, so that they can purchase and download the DBISAM 3 ODBC driver? >> Sure, just have them use this link: http://www.elevatesoft.com/products?action=order&category=dbisam&type=other and just let them know that they need the DBISAM ODBC Standard product. If you have any other questions, please let me know. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |