Re: [Firebird-net-provider] autonumber field

2007-01-11 Thread Carlos Guzmán Álvarez
Hello: > You're right. > >From DDEX, right now I would expect possibility to put plan in my sql > statements, but, it's not working for now. The trik is to edit the > designer.cs file and it works. Carlos said that VS verify the syntax agains > possible error. For now looks like VS is strictly orie

Re: [Firebird-net-provider] Wrong parameter declaration

2007-01-11 Thread Carlos Guzmán Álvarez
Hello: > Any ideas Carlos? This is really weird (but as usuall, it will some small > easy-to-fix problem). > I will try to review it this weekend, but if FbCommandBuilder, FbConnection.GetSchema, and FbDataReader.GetSchema returns correct info it's going to be hard to find were the problem is

Re: [Firebird-net-provider] Wrong parameter declaration

2007-01-11 Thread Jiri Cincura
sasha wrote: > Didn't you find who delete quotes when command formatting? I don't have to find it. I know it. VS is the wrong man. -- Jiri {x2} Cincura http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com - Take Survey

Re: [Firebird-net-provider] Wrong parameter declaration

2007-01-11 Thread sasha
Didn't you find who delete quotes when command formatting? - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics th

Re: [Firebird-net-provider] Wrong parameter declaration

2007-01-11 Thread Jiri Cincura
sasha wrote: > CREATE TABLE "_Test" ("Id" INT PRIMARY KEY, "Int64" BIGINT, "String" > VARCHAR(100)); I've found another interesting feature. For table, if you create it like yours, you get 3 params for Int64 - Int64, Original and _Null. Two first are right System.Int64, the 3rd (for null) is I

Re: [Firebird-net-provider] Error on geting value from stored procedure

2007-01-11 Thread Jiri Cincura
Mercea Paul wrote: >> Sorry what is the one you are using in the connection string ?? > Coonection string : > connectionString="data source=192.168.1.250;initial catalog=gestiny;user > id=SYSDBA;password=masterkey" providerName="FirebirdSql.Data.FirebirdClient" > /> Try to add there character set.

Re: [Firebird-net-provider] autonumber field

2007-01-11 Thread Jiri Cincura
Mercea Paul wrote: > designer.cs file and it works. Carlos said that VS verify the syntax agains > possible error. For now looks like VS is strictly oriented to SQL, but, I Yes, it's a damn desing bug. -- Jiri {x2} Cincura http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com --

Re: [Firebird-net-provider] autonumber field

2007-01-11 Thread Mercea Paul
> Well, this is a problem by design. > > The MS SQL has "identity", which is in fact something like > autoincrement id. > This is a property of column. But FB has more powerfull (OK, little bit > PR) > generators. But bind between column and (trigger and) generator cannot > be > discovered easily.

Re: [Firebird-net-provider] Wrong parameter declaration

2007-01-11 Thread Jiri Cincura
sasha wrote: > Maby it's MS SQL's provider issue ;-) If somethink goes wrong, the MS SQL Provider is base for any other decisions. -- Jiri {x2} Cincura http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com - Take Survey

Re: [Firebird-net-provider] Wrong parameter declaration

2007-01-11 Thread Jiri Cincura
>> now close editor and look at parameters collection and you'll see that >> parameter @Int64 is of type Int32. > > Yes, there's a problem. I'll try to look at it. > You know, what's really weird. Look at this (the test1 is your view "Test"): ColumnName = INT64 ColumnOrdinal = 1 ColumnSize = 8

Re: [Firebird-net-provider] autonumber field

2007-01-11 Thread Jiri Cincura
Mercea Paul wrote: >> Let's clarify this a little. >> >> You have table with PK ID, the ID is generated by generator in trigger, >> right? >> If you insert the row into grid you get error because ID is null, >> right? > > Right! Well, this is a problem by design. The MS SQL has "identity", whic

Re: [Firebird-net-provider] Wrong parameter declaration

2007-01-11 Thread sasha
> It's because it's view. Neither provider for MS SQL generates update for view. Maby it's MS SQL's provider issue ;-) > Yes, there's a problem. I'll try to look at it. Thanks! - Take Surveys. Earn Cash. Influence the Fut

Re: [Firebird-net-provider] Error on geting value from stored procedure

2007-01-11 Thread Mercea Paul
> Sorry what is the one you are using in the connection string ?? Coonection string : connectionString="data source=192.168.1.250;initial catalog=gestiny;user id=SYSDBA;password=masterkey" providerName="FirebirdSql.Data.FirebirdClient" /> --

Re: [Firebird-net-provider] autonumber field (was: Wrong parameter declaration)

2007-01-11 Thread Mercea Paul
> Let's clarify this a little. > > You have table with PK ID, the ID is generated by generator in trigger, > right? > If you insert the row into grid you get error because ID is null, > right? Right! - Take Surveys. Earn Ca

Re: [Firebird-net-provider] Error on geting value from stored procedure

2007-01-11 Thread Carlos Guzmán Álvarez
Hello: > In tabel structure luook like > VARCHAR(30) CHARACTER SET ISO8859_2 COLLATE ISO8859_2. > > This could be the problem? > I do I try to modify to none! > Sorry what is the one you are using in the connection string ?? -- Carlos Guzmán Álvarez Vigo-Spain http://carlosga.wordpress.com

[Firebird-net-provider] autonumber field (was: Wrong parameter declaration)

2007-01-11 Thread Jiri Cincura
Mercea Paul wrote: > You're right. > But for autonumber field, if I don't correct manually allowdbnull for each > insertion in datagridview I get error, generate by grid (VS), because > expecting value for ID column! Let's clarify this a little. You have table with PK ID, the ID is generated by g

Re: [Firebird-net-provider] Wrong parameter declaration

2007-01-11 Thread Mercea Paul
> Mercea Paul wrote: > > I have meet same problem. > > SQL generated for update with designer generate error. > > For Autonumber fields I modify allownull to true, and is autonumber > to true. > > For update statement, I have deleted all where blab la bla, and let > only > > where [EMAIL PROTECTED]

Re: [Firebird-net-provider] Wrong parameter declaration

2007-01-11 Thread Jiri Cincura
Mercea Paul wrote: > I have meet same problem. > SQL generated for update with designer generate error. > For Autonumber fields I modify allownull to true, and is autonumber to true. > For update statement, I have deleted all where blab la bla, and let only > where [EMAIL PROTECTED] and it works wi

Re: [Firebird-net-provider] Wrong parameter declaration

2007-01-11 Thread Mercea Paul
I have meet same problem. SQL generated for update with designer generate error. For Autonumber fields I modify allownull to true, and is autonumber to true. For update statement, I have deleted all where blab la bla, and let only where [EMAIL PROTECTED] and it works without errors. Regards, Paul

Re: [Firebird-net-provider] Error on geting value from stored procedure

2007-01-11 Thread Jiri Cincura
Mercea Paul wrote: > Surprise! > It's working like a charm. Welcome back, man. :) > In tabel structure luook like > VARCHAR(30) CHARACTER SET ISO8859_2 COLLATE ISO8859_2. > > This could be the problem? > I do I try to modify to none! This problem still exists? If so, maybe is problem with you

Re: [Firebird-net-provider] Error on geting value from stored procedure

2007-01-11 Thread Mercea Paul
> >Carlos > > I try putting @ before params and I get : > > "Additional information: arithmetic exception, numeric overflow, or > string > > truncation" > > > > I tested in dataset->Preview data, works ok, as procedure or sql. > > It's not working from code! > > > What is the character set you are

Re: [Firebird-net-provider] Wrong parameter declaration

2007-01-11 Thread Jiri Cincura
sasha wrote: > And yet one inconvenience. Seems designer knows what fields in table are > primary keys. So why don't it generates UPDATE and DELETE commands > using only this keys in WHERE clause: > > ... WHERE Id = @Original_Id; Because MS likes "optimistic concurency". -- Jiri {x2} Cincur

Re: [Firebird-net-provider] Wrong parameter declaration

2007-01-11 Thread Jiri Cincura
sasha wrote: > Now you can see first problems. Look at properties of > "_TestTableAdapter" and you'll see that select, insert, update and > delete commands were generated successfully. Parameters types also correct. > > Now look at properties of "TestTableAdapter". It has only select > command.

Re: [Firebird-net-provider] Error on geting value from stored procedure

2007-01-11 Thread Mercea Paul
> > cmdGetSypParam.CommandText = "SELECT PVALUE FROM SYS_PARAMETERS > WHERE > > " + > >"(PAR_CODE = @pcode) AND > (SUBSYSTEM = > > @psubsystem)"; > > This is not working (with "old" SP): > select * from SYS_GET_PARAM(@param, ...) > > -- > Jiri {x2} Cincur

Re: [Firebird-net-provider] Error on geting value from stored procedure

2007-01-11 Thread Mercea Paul
In tabel structure luook like VARCHAR(30) CHARACTER SET ISO8859_2 COLLATE ISO8859_2. This could be the problem? I do I try to modify to none! > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Carlos Guzmán Álvarez > Sent: Thursday, January 11, 2007

Re: [Firebird-net-provider] Error on geting value from stored procedure

2007-01-11 Thread Jiri Cincura
Mercea Paul wrote: > cmdGetSypParam.CommandText = "SELECT PVALUE FROM SYS_PARAMETERS WHERE > " + >"(PAR_CODE = @pcode) AND (SUBSYSTEM = > @psubsystem)"; This is not working (with "old" SP): select * from SYS_GET_PARAM(@param, ...) -- Jiri {x2} Cincura ht

Re: [Firebird-net-provider] Error on geting value from stored procedure

2007-01-11 Thread Carlos Guzmán Álvarez
Hello: > Hi Carlos > I try putting @ before params and I get : > "Additional information: arithmetic exception, numeric overflow, or string > truncation" > > I tested in dataset->Preview data, works ok, as procedure or sql. > It's not working from code! > What is the character set you are using

Re: [Firebird-net-provider] Error on geting value from stored procedure

2007-01-11 Thread Mercea Paul
I give up today with this SP. I have changed to: string val; FbConnection fbsyspar = new FbConnection(Properties.Settings.Default.AppConnStr); FbCommand cmdGetSypParam = new FbCommand(); cmdGetSypParam.CommandText = "SELECT PVALUE FROM SYS_PARAMETERS WHERE " +

Re: [Firebird-net-provider] Error on geting value from stored procedure

2007-01-11 Thread Mercea Paul
Hi Carlos I try putting @ before params and I get : "Additional information: arithmetic exception, numeric overflow, or string truncation" I tested in dataset->Preview data, works ok, as procedure or sql. It's not working from code! > -Original Message- > From: [EMAIL PROTECTED] > [mailt

Re: [Firebird-net-provider] Error on geting value from stored procedure

2007-01-11 Thread Jiri Cincura
>> val = cmdGetSypParam.ExecuteScalar().ToString(); Sorry, I was thinking you're getting whole resultset. -- Jiri {x2} Cincura http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com - Take Surveys. Earn Cash.

Re: [Firebird-net-provider] Error on geting value from stored procedure

2007-01-11 Thread Jiri Cincura
Mercea Paul wrote: > FbCommand cmdGetSypParam = new FbCommand(); > > cmdGetSypParam.CommandText = "SYS_GET_PARAM"; Try to use here select * from SYS_GET_PARAM(@param, ...). > cmdGetSypParam.CommandType = CommandType.StoredProcedure; > > cmdGetSypP

Re: [Firebird-net-provider] Error on geting value from stored procedure

2007-01-11 Thread Carlos Guzmán Álvarez
Hello: > > cmdGetSypParam.Parameters.AddWithValue("PCODE", cod); > > cmdGetSypParam.Parameters.AddWithValue("PSUBSYSTEM", ss); > Try as: cmdGetSypParam.Parameters.AddWithValue("@PCODE", cod); cmdGetSypParam.Parameters.AddWithValue("@PSUBSYSTEM", ss

[Firebird-net-provider] Error on geting value from stored procedure

2007-01-11 Thread Mercea Paul
Hi FB2 SS, Firebird .Net provider 2.1.0, VS2005 c#. I have in database one procedure like this: CREATE PROCEDURE SYS_GET_PARAM ( psubsystem char(3), pcode varchar(30) character set iso8859_2) returns ( pval varchar(30) character set iso8859_2) as begin select pvalue from sys

Re: [Firebird-net-provider] Can I get path to database on Backup?

2007-01-11 Thread Jiri Cincura
Mercea Paul wrote: >> > the backup file I found in system32 folder. >> >> You can insert here the absolute path... > I don't want to use absolute path, different system have different > partitions for data.Maybe one more parameter, as backup file, ... The relative path works too. :) >> >> > The

Re: [Firebird-net-provider] Can I get path to database on Backup?

2007-01-11 Thread Mercea Paul
> > the backup file I found in system32 folder. > > You can insert here the absolute path... I don't want to use absolute path, different system have different partitions for data.Maybe one more parameter, as backup file, ... > > > There is a way to found database path on server from alias? > >

Re: [Firebird-net-provider] Can I get path to database on Backup?

2007-01-11 Thread Jiri Cincura
Mercea Paul wrote: > the backup file I found in system32 folder. You can insert here the absolute path... > There is a way to found database path on server from alias? I don't know how it's releted to the backup, but yes, it's possible, but now I'm not sure, whether provider has any property fo

[Firebird-net-provider] Can I get path to database on Backup?

2007-01-11 Thread Mercea Paul
Hi I am using aleases for fb database like this: Dboperation=D:\database\operation.fdb I make conection like : connectionString="data source=192.168.1.250;initial catalog= Dboperation;user id=SYSDBA;password=masterkey" If I make backup like fbbsvc.ConnectionString = connectionString; f