Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remote view redefine field to support NULL
Message
De
19/05/2003 13:55:56
 
 
À
16/05/2003 10:06:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00789213
Message ID:
00790070
Vues:
23
>Hi
>
>exists a way to force a local field of remote view to support null value?
>
>I can change data type, but i don't see nullable checkbox.
>
>I don't want uses trick values ( zero, empty .. ) for rapresent value lack.
>
>Fabio

Hi Fabio,

Just change remote query to return 'NULLable" field.
Here is an example for SQL Server:
CLOSE DATABASES all
SET MULTILOCKS ON
CLEAR

con=SQLCONNECT("LocalServer")
?SQLEXEC(con,"CREATE table #test (f1 int NOT NULL IDENTITY,f2 varchar(10))")
?SQLEXEC(con,"insert into #test (f2) values('1111111')")
?SQLEXEC(con,"select f1,f2 from #test","res")
SELECT res
DISPLAY STRUCTURE
LIST

?SQLEXEC(con,"select NULLIF(f1,NULL),f2 from #test","res")
SELECT res
DISPLAY STRUCTURE
LIST
CURSORSETPROP("Buffering",5)
INSERT INTO res VALUES (NULL,"22222")
LIST
TABLEREVERT(.T.)
SQLDISCONNECT(0)
return
Thanks,
Aleksey.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform