Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stored Procedure with reference Parameter called by OLEDB
Message
De
20/08/2008 06:00:30
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Titre:
Stored Procedure with reference Parameter called by OLEDB
Divers
Thread ID:
01340318
Message ID:
01340318
Vues:
62
Hi!

We use the VFP DBC with c#.NET. One Stored Procedure gives us back values by Reference Parameters.

Bud we've only get an empty string back.

Any Idea to solve the Problem?
           if (curCon.State == ConnectionState.Open)
            {


                OleDbCommand command = curCon.CreateCommand();
                command.CommandType = CommandType.StoredProcedure;
                command.CommandText = "sp_LongNextInternalNumber";


                // Erster Parameter
                IDbDataParameter para = command.CreateParameter();

                para.Direction = ParameterDirection.Input;
                para.DbType = DbType.String;
                para.Size = 80;
                para.ParameterName = "tcTableName";
                para.Value = "Logbuch";
                command.Parameters.Add(para);

                // Zweiterparameter = Rückgabewert!
                IDbDataParameter resultpara = command.CreateParameter();

                resultpara.Direction = ParameterDirection.InputOutput;
                resultpara.DbType = DbType.AnsiString;
                resultpara.Size = 15;
                resultpara.Value = "              ";
                resultpara.ParameterName = @"@tcReferenzLfdNrRueckgabe";
                command.Parameters.Add(resultpara);

                try
                {
                    command.ExecuteNonQuery();
                }
                catch (OleDbException exception)
                {

                }


                string lfdnr = resultpara.Value.ToString();

                MessageBox.Show(lfdnr, "lfdnr");
Jörg Schneider
Joerg.Schneider@SMARTCRM.de
SMARTCRM CRM powered by MS Visual FoxPro
SMARTCRM GmbH
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform