Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What type shall I use in SQL Server 2008 for VFP memo fi
Message
De
30/08/2010 11:44:06
 
 
À
30/08/2010 11:13:38
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
01478926
Message ID:
01479213
Vues:
28
I am trying to get local vfp data stored in kba_data.contacts (dbf) into a new sql2080 database called cmc
i have tried theupload wizards and they fail


Peter



>>OK i get a connection now
>>but this :
>>
>>
>>
>>gnConnHandle = SQLCONNECT("SQL")
>>
>>*SQLEXEC(gnConnHandle , [select * from contacts],"cc1")  &&& works
>>
>>
>>
>>
>>SQLEXEC(gnConnHandle , [INSERT INTO dbo.contacts (firstname,lastname) SELECT fname,lname FROM kba_data.contacts])
>>
>>SQLDISCONNECT(gnConnHandle )
>>
>>
>>does not insert anything
>>
>>how would i do that correctly
>>
>>
>>Peter
>
>what is the database name that holds contacts that you are inserting into? (Put correct stuff where square brackets are)
>
>SQLEXEC(gnConnHandle, "INSERT INTO [databasename].dbo.contacts (firstname, lastname) SELECT firstname, lastname from kba_data.dbo.contacts WHERE [add where condition here]"
>
>So if the database you are inserting into is kbb_data and you only wanted to insert records from kba_data that had the firstname of John:
>
>
>SQLEXEC(gnConnHandle, "INSERT INTO kbb_data.dbo.contacts (firstname, lastname) SELECT firstname, lastname from kba_data.dbo.contacts WHERE firstname = 'John' ")
Peter Cortiel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform