for .net 3.5
the setting of web.config
else follow below link
for changing setting of your application property
http://msdn.microsoft.com/en-us/library/bb398791.aspx
Monday, June 27, 2011
Saturday, June 25, 2011
Sql server connection with Foxpro 9.0
LOCAL hConn
STORE SPACE(40) TO strname
STORE SPACE(1000) TO strstring
hConn = SQLStringConnect("Dsn=Sql Server;trusted_connection=Yes;wsid=MachineName-PC;database=Hackensack")
hConn = SQLConnect("Sql Server", "falseuser", "")
IF (hConn < 0)
LOCAL ARRAY laError[1]
AERROR(laError)
MESSAGEBOX( ;
laError[2], ;
"Error " + TRANSFORM(laError[5]))
*laError[5] --show the what error happen
ELSE
CLEAR
@10,10 say "Enter the Name :" Get strname
read
*--sql insert string
strstring = "insert into Table1 (Name) values ('"+RTRIM(strname) +"')"
@ 17, 2 SAY [String : ] + TRIM(strstring)
SQLEXEC(hConn ,strstring )
MESSAGEBOX("Add Successfully")
SQLEXEC(hConn , 'SELECT * FROM Table1', 'Table1')
BROWSE
SQLDISCONNECT(hConn )
ENDIF
STORE SPACE(40) TO strname
STORE SPACE(1000) TO strstring
hConn = SQLStringConnect("Dsn=Sql Server;trusted_connection=Yes;wsid=MachineName-PC;database=Hackensack")
hConn = SQLConnect("Sql Server", "falseuser", "")
IF (hConn < 0)
LOCAL ARRAY laError[1]
AERROR(laError)
MESSAGEBOX( ;
laError[2], ;
"Error " + TRANSFORM(laError[5]))
*laError[5] --show the what error happen
ELSE
CLEAR
@10,10 say "Enter the Name :" Get strname
read
*--sql insert string
strstring = "insert into Table1 (Name) values ('"+RTRIM(strname) +"')"
@ 17, 2 SAY [String : ] + TRIM(strstring)
SQLEXEC(hConn ,strstring )
MESSAGEBOX("Add Successfully")
SQLEXEC(hConn , 'SELECT * FROM Table1', 'Table1')
BROWSE
SQLDISCONNECT(hConn )
ENDIF
Subscribe to:
Posts (Atom)