VB et FOXPRO

youil Messages postés 67 Date d'inscription vendredi 28 mars 2003 Statut Membre Dernière intervention 12 juillet 2011 - 13 déc. 2007 à 14:40
youil Messages postés 67 Date d'inscription vendredi 28 mars 2003 Statut Membre Dernière intervention 12 juillet 2011 - 14 déc. 2007 à 01:37
Je veux ajouter ou modifier un champs mémo dans une table foxpro .dbf avec une chaîne qui contiens un saut de ligne. Quand je place le caractère 10 dans ma string j'ai une erreur, mais quand je place une chaîne normale pas de saut de ligne ça fonctionne quoi faire ?

Merci pour vos réponse !!!

Voici l'erreur:
ERROR [42000][Microsoft][ODBC Visual Foxpro Driver]Command contains unrecognized phase/keyword

Voici ma connection (con_foxpro):
Dim con_fox
As Odbc.OdbcConnection
con_fox =
New Odbc.OdbcConnection(
"BackgroundFetch=Yes;DSN=Visual FoxPro Tables;UID=;SourceType=DBF;Collate=Machine;SourceDB=C:\;Exclusive=No")

Voici ma requête:
dim ssql as string
ssql =
"Update actifs2 Set notes='" & txt.Text &
"' Where num=1"
ajouter_insert_foxpro(ssql
)

voici ajouter_insert_foxpro:
Dim
insert_com
As
New Odbc.OdbcCommand
con_foxpro
insert_com.Connection = con_fox
insert_com.CommandText = lien

insert_com.ExecuteNonQuery()

con_fox.Close()

2 réponses

PCPT Messages postés 13272 Date d'inscription lundi 13 décembre 2004 Statut Membre Dernière intervention 3 février 2018 47
14 déc. 2007 à 00:53
salut,

à première vue je dirais que ton champ devrait être de type MEMO plutôt que TEXT mais c'est qu'une idée...

<hr size="2" width="100%" />Prenez un instant pour répondre à [infomsg_SONDAGE-POP3-POUR-CS_769706.aspx ce sondage] svp
0
youil Messages postés 67 Date d'inscription vendredi 28 mars 2003 Statut Membre Dernière intervention 12 juillet 2011
14 déc. 2007 à 01:37
mon champ est mémo !!!
0
Rejoignez-nous