csql = "INSERT INTO teste1 (texto) Values (?Y)" >>>I making some test to insert a DOC file into a SQL Server Table, but havent success in doing it!
>>CREATE TABLE [dbo].[teste1] ( >> [codigo] [int] IDENTITY (1, 1) NOT NULL , >> [texto] [image] NULL >>) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] >>GO >>>>
>>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" >>