Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert a Word file in SQL Server
Message
De
26/08/2004 17:04:37
Peter Wagner
Point Informática Ltda.
Limeira, Brésil
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Insert a Word file in SQL Server
Divers
Thread ID:
00936777
Message ID:
00936777
Vues:
68
I making some test to insert a DOC file into a SQL Server Table, but havent success in doing it!
Any Idea or advice how to do it ?
I tried with Image, Ntext, text field in SQL Server, and it didnt work also.
What Im missing ?
Thanks in Advance

Peter

* On SQL Server:
CREATE TABLE [dbo].[teste1] (
	[codigo] [int] IDENTITY (1, 1) NOT NULL ,
	[texto] [image] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
*ON VFP
CLEAR
=SQLDISCONNECT(0)
x = GETFILE("Doc","Word File")
Y = FILETOSTR(x)

cStringConnect =("DRIVER={SQL Server};SERVER=BOSS700;UID=xxx;PWD=xxx;DATABASE=Atuante2")
nID = SQLSTRINGCONNECT(cStringConnect)

csql = "INSERT INTO teste1(texto)Values("  + Y + ")"
a = SQLEXEC(nID,csql)
?a
IF a < 1
	=AERROR(my_erro)
	DISPLAY MEMORY LIKE my_erro
ELSE
	WAIT WINDOW "OK" TIMEOUT 1.5
ENDIF
* ERROR message:
my_erro(1,1) = 1526
my_erro(1,2) = "Connectivity error: [Microsoft] [ODBC SQL Server] [SQL Server] "
			   "The name 'ÐÏ'is not permitted in this context. Only constants, "
			   "expressionas, or variables allowed here. Column names are not permitted."
my_erro(1,4) = "37000"
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform