Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Go to rec number
Message
De
11/12/2005 09:29:14
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
10/12/2005 14:55:59
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Versions des environnements
OS:
Windows Server 2003
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01076881
Message ID:
01076962
Vues:
17
>tank'u but i dont understand'u i've this ;
>
>Public Function buscar(ByVal registro As integer) As DataSet
> Dim ds As New DataSet
> Dim olecommand As New OleDbCommand
>
> olecommand.CommandText = "select * from recordfile "
> Dim oleadapter As New OleDbDataAdapter
> 'Dim id As New OleDbParameter("@id", OleDbType.Char, 10)
>
> 'id.Value = registro
>
> 'olecommand.Parameters.Add(id)
>
> olecommand.CommandType = CommandType.Text
>
> olecommand.Connection = oleconect
> oleadapter.SelectCommand = olecommand
> Try
> ' oleconect.Open()
> 'olecommand.ExecuteNonQuery()
> oleadapter.Fill(ds)
> 'oleconect.Close()
> Return ds
> Catch ex As Exception
> MessageBox.Show(ex.Message)
> End Try
>
>
> End Function
>
>parameter registro is the rec number i'need obtain datas to that number. than'u how i make that.

Oh you mean parameter. Then depending on your backend select command should look like:

"select * from recordfile where myPrimaryKeyField = ?"

"select * from recordfile where myPrimaryKeyField = @id"

It can't be record number however but primarty key (most backends do not have a concept of recno()).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform