Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > how to deploy the delphi for .net winform applicaiton
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 7th July 20:39
leo
External User
 
Posts: 1
Default how to deploy the delphi for .net winform applicaiton



i have add reference below file in the project
i use BDP.NET to connection MSSQL2000
the target machine is window xp professional edition

Borland.Data.Provider.dll
Borland.Data.Common.dll
Borland.Data.Mssql.dll
bdpmss20.dll

i have build and compiler *.exe in the target machine which not have install
delphi
but receive a error ..Common Language Rutime Error.. error code =0x654(1620)
, 0xc9c(3228)
how to solve it?
  Reply With Quote


  sponsored links


2 7th July 20:40
david wilcockson
External User
 
Posts: 1
Default how to deploy the delphi for .net winform applicaiton



Use the Reflection tool to check which dlls you need (look on the Uses tab).
For example you probably also need Borland.Delphi.dll

David
  Reply With Quote
3 7th July 20:40
leo
External User
 
Posts: 1
Default how to deploy the delphi for .net winform applicaiton


thax David reply ,but still can't deploy the applicaiton when use BDP.NET .
i use ADO.NET it can success install in target machine ,
but when i use BDP.NET to conect database .. still have error ...
have any idea?

i have check the reflection tool to check which dlls need(look on the uses
tab)

"David Wil****son" <dnwatlibriosdotcom> ¼¶¼g©ó¶l¥ó·s»D:4207ea0b@newsgroups.borland.com...
  Reply With Quote
4 7th July 20:40
david wilcockson
External User
 
Posts: 1
Default how to deploy the delphi for .net winform applicaiton


ADO.NET is built into .dotnet so no need to deploy anything. Where are you
putting the DLLs for BDP? Try putting them in the same folder as your main
executable for the moment. You can also use the Microsoft .NET wizards to
help pin point the problem.

You might also try putting all the Borland DLLs in this folder and then see
if the program runs! If it does you can then remove them step by step.

These are the ones you may need:

Borland.Data.Common.dll
Borland.Data.Provider.dll
Borland.Delphi.dll

If it is a VCL application you may also need:

Borland.Vcl.dll
Borland.VclActnBand.dll
Borland.VclAdoDb.dll
Borland.VclAdoNet.dll
Borland.VclDbCtrls.dll
Borland.VclDbRtl.dll
Borland.VclDbxCds.dll
Borland.VclDSnap.dll
Borland.VclRtl.dll
Borland.VclX.dll

David
  Reply With Quote
5 7th July 20:40
leo
External User
 
Posts: 1
Default how to deploy the delphi for .net winform applicaiton


thx david suggestion , i follow your suggestion copy
Borland.Data.Common.dll,Borland.Data.Provider.dll, Borland.Delphi.dll to
project1.exe same path ..
but still got following error..i capture more infomation below ..program
code and error message.
please help.

Delphi program code

unit WinForm1;

interface

uses
System.Drawing, System.Collections,
System.ComponentModel,
System.Windows.Forms, System.Data,
Borland.Data.Provider,
Borland.Data.Common,
Borland.Data.MSSQL;

type
TWinForm1 = class(System.Windows.Forms.Form)
{$REGION 'Designer Managed Code'}
strict private
/// <summary>
/// Required designer variable.
/// </summary>
Components: System.ComponentModel.Container;
Button1: System.Windows.Forms.Button;
RichTextBox1: System.Windows.Forms.RichTextBox;
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
procedure InitializeComponent;
procedure Button1_Click(sender: System.Object; e: System.EventArgs);
{$ENDREGION}
strict protected
/// <summary>
/// Clean up any resources being used.
/// </summary>
procedure Dispose(Disposing: Boolean); override;
private
{ Private Declarations }
public
constructor Create;
end;

[assembly: RuntimeRequiredAttribute(TypeOf(TWinForm1))]

implementation

{$AUTOBOX ON}

{$REGION 'Windows Form Designer generated code'}
/// <summary>
/// Required method for Designer support -- do not modify
/// the contents of this method with the code editor.
/// </summary>
procedure TWinForm1.InitializeComponent;
begin
Self.Button1 := System.Windows.Forms.Button.Create;
Self.RichTextBox1 := System.Windows.Forms.RichTextBox.Create;
Self.SuspendLayout;
Self.Button1.Location := System.Drawing.Point.Create(32, 16);
Self.Button1.Name := 'Button1';
Self.Button1.Size := System.Drawing.Size.Create(96, 80);
Self.Button1.TabIndex := 0;
Self.Button1.Text := 'Button1';
Include(Self.Button1.Click, Self.Button1_Click);
Self.RichTextBox1.Location := System.Drawing.Point.Create(32, 128);
Self.RichTextBox1.Name := 'RichTextBox1';
Self.RichTextBox1.Size := System.Drawing.Size.Create(352, 216);
Self.RichTextBox1.TabIndex := 1;
Self.RichTextBox1.Text := 'RichTextBox1';
Self.AutoScaleBaseSize := System.Drawing.Size.Create(5, 15);
Self.ClientSize := System.Drawing.Size.Create(416, 382);
Self.Controls.Add(Self.RichTextBox1);
Self.Controls.Add(Self.Button1);
Self.Name := 'TWinForm1';
Self.Text := 'WinForm1';
Self.ResumeLayout(False);
end;
{$ENDREGION}

procedure TWinForm1.Dispose(Disposing: Boolean);
begin
if Disposing then
begin
if Components <> nil then
Components.Dispose();
end;
inherited Dispose(Disposing);
end;

constructor TWinForm1.Create;
begin
inherited Create;
InitializeComponent;
end;

const
ConnPrefixMSSQL = 'assembly=Borland.Data.Mssql,Version=2.0.0.0,
Culture=neutral, ' +
'PublicKeyToken=91d62ebb5b0d1b1b;vendorclient=sqlo ledb.dll;'
+
'Provider=MSSQL;';
ConnDetailsMSSQL =
'database=Northwind;username=sa;password=password; hostname=hostname';

var
ConnectionString: string;
Connection: BDPConnection;
Command: BDPCommand;
Reader: BDPDataReader;
Value1: string;

procedure TWinForm1.Button1_Click(sender: System.Object; e:
System.EventArgs);
begin
ConnectionString := ConnPrefixMSSQL + ConnDetailsMSSQL;
Connection := BDPConnection.Create(ConnectionString);
Connection.Open;
Command := Connection.CreateCommand;
Command.CommandText := 'Select city from customers';
Reader := Command.ExecuteReader;
Self.RichTextBox1.Text:='';
while reader.Read do
begin
Value1 := Reader.GetString(0);
Self.Button1.Text :=Value1;
Self.RichTextBox1.Text:=Self.RichTextBox1.Text+Val ue1+chr(13) ;
end;
Reader.Free;
Command.Close;
Connection.Close;
end;
end.


See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileLoadException: The located assembly's manifest definition with
name 'Borland.Data.Provider' does not match the assembly reference.
File name: "Borland.Data.Provider"
at WinForm1.TWinForm1.Button1_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)

=== Pre-bind state information ===
LOG: DisplayName = Borland.Data.Provider, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=91d62ebb5b0d1b1b
(Fully-specified)
LOG: Appbase = C:\Project5\
LOG: Initial PrivatePath = NULL
Calling assembly : Project1, Version=1.0.1871.17249, Culture=neutral,
PublicKeyToken=null.
===

LOG: Publisher policy file is not found.
LOG: Host configuration file not found.
LOG: Using machine configuration file from
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\confi g\machine.config.
LOG: Post-policy reference: Borland.Data.Provider, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b
LOG: Attempting download of new URL
file:///C:/Project5/Borland.Data.Provider.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Minor Version

************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
Project1
Assembly Version: 1.0.1871.17249
Win32 Version: 1.0.1871.17249
CodeBase: file:///C:/Project5/Project1.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase:
file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
Accessibility
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/accessibility/1.0.5000.0__b03f5f7f11d50a3a/accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.

"David Wil****son" <dnwatlibriosdotcom> ¼¶¼g©ó¶l¥ó·s»D:420e64fd$1@newsgroups.borland.com.. .
  Reply With Quote
6 7th July 20:40
david wilcockson
External User
 
Posts: 1
Default how to deploy the delphi for .net winform applicaiton


This states that you are using borland.data.provider.dll version 2.0.0.0:
The one on my Delphi machine is 2.1.0.0

This is why you are getting: 'Comparing the assembly name resulted in the
mismatch: Minor Version'

I think you should search for borland.data.provider.dll and check what you
have. Right-hand click on each one in Windows and go Properties and then
Version to check that they are the right ones.

Best wishes

David
  Reply With Quote
7 14th July 13:50
leo
External User
 
Posts: 1
Default how to deploy the delphi for .net winform applicaiton


thx david !
i can successfuly deploy the first program !!!
i find that i am using
Borland.Data.Common.dll 2.1.0.0
Borland.Data.Mssql.dll 2.0.0.0
Borland.Data.Provider.dll 2.1.0.0
when i replace Borland.Data.Common.dll 2.0.0.0 and
Borland.Data.Provider.dll 2.0.0.0
the application can run successfuly !

but , i find all in my machine , can't find any file of
Borland.Data.Mssql.dll 2.1.0.0 can only find Borland.Data.Mssql.dll
2.0.0.0.
i want to know is that problem is cause by Delphi 2005 update ? because i
have download and run the update file before..
thx david


"David Wil****son" <dnwatlibriosdotcom> ¼¶¼g©ó¶l¥ó·s»D:42107af0@newsgroups.borland.com...
  Reply With Quote
8 14th July 13:50
david wilcockson
External User
 
Posts: 1
Default how to deploy the delphi for .net winform applicaiton


Yes - my system is the same


The dates on the files would suggest that some of the files were updated in
sp1.

Good to hear that it's all working now!

David
  Reply With Quote
9 14th July 13:50
leo
External User
 
Posts: 1
Default how to deploy the delphi for .net winform applicaiton


Where can download D2K5 SP, patch or update file , course IDE have some
bugs ...i really want to use delphi 2K5 THX!


"David Wil****son" <dnwatlibriosdotcom> ¼¶¼g©ó¶l¥ó·s»D:42125918$1@newsgroups.borland.com.. .
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666