From: Jeff <in...@we...> - 2003-12-25 11:36:08
|
Hi there. =20 I=E2=80=99m a vb.net programmer. =20 I wanted to develop a fast database driven distributable application = which could be installed on a computer from a cd without installing any = servers or extra applications I chose FireBird, and I=E2=80=99m not sure if it=E2=80=99s the best = choice yet. =20 I=E2=80=99m using FireBird 1.5 and .net provider Release Candidate 1 ( = 2003-12-07 ) under windows XP Service Pack 1 I know that for my purpose I must use =E2=80=9CThe embedded = server=E2=80=9D=20 =20 My first question is=20 Can I use the embedded server=E2=80=99s libraries with .net provider? If yes where can I set which libraries the .net provider = should use? If no, is .net provider a good choice in my case? Will it = work as a stand alone application which needs no other servers or = services to be installed on client=E2=80=99s machine? =20 =20 My second question is Where and how can I make a new firebird account? =20 My third question is Does firebird provide a tool that acts like =E2=80=9Cprofiler=E2=80=9D = in Microsoft sql server? I tool that you can see what messages are being = exchanged from the server to the client? This is very useful for = debugging. =20 =20 =20 I=E2=80=99m using the following code to enter data to a table =20 Dim connection_string As String =3D = "Database=3DC:\mydb\AAA.FDB;User=3DSYSDBA;Password=3Dmasterkey;Dialect=3D= 3;Server=3Dlocalhost" Dim mainconnection As New FbConnection mainconnection =3D New FbConnection(connection_string) mainconnection.Open() =20 Dim transaction As FbTransaction =3D = mainconnection.BeginTransaction() Dim command As FbCommand =3D New FbCommand("insert into = TELEPHONENUMBERS = (NAME,LASTNAME,COMPANY,TELEPHONENUMBER,FAXNUMBER,TELEXNUMBER,EMAILADDRESS= ,WEBSITE,MOBILENUMBER) = values(@NAME,@LASTNAME,@COMPANY,@TELEPHONENUMBER,@FAXNUMBER,@TELEXNUMBER,= @EMAILADDRESS,@WEBSITE,@MOBILENUMBER)", mainconnection, transaction) =20 =20 command.Parameters.Add("@NAME", 1) command.Parameters.Add("@LASTNAME", 2) command.Parameters.Add("@COMPANY", "dd") command.Parameters.Add("@TELEPHONENUMBER", 41) command.Parameters.Add("@FAXNUMBER", 54) command.Parameters.Add("@TELEXNUMBER", 2343) command.Parameters.Add("@EMAILADDRESS", 123) command.Parameters.Add("@WEBSITE", 231) command.Parameters.Add("@MOBILENUMBER", 12342) =20 =20 =20 command.ExecuteNonQuery() =20 transaction.Commit() =20 But I=E2=80=99m getting the following error: =20 An unhandled exception of type 'System.InvalidCastException' occurred in = firebirdsql.data.firebird.dll Additional information: Specified cast is not valid. =20 What could be the problem? Thanks, and happy new year to you all! |