Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem updating tables from Stored Procedure
Message
From
27/06/2006 12:14:26
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01132012
Message ID:
01132070
Views:
23
Dmitry,
For a check I quickly did this one (testdata.dbc):
Procedure AddCustomer
USE testdata!customer In 0 Alias myCustomer
Append Blank in 'myCustomer'
replace cust_id with Right(Sys(2015),6),Company with ".Net company-"+Ttoc(Datetime(),1)
use
endproc
ASP.Net page with a single button to call procedure:
    protected void Button1_Click(object sender, EventArgs e)
    {
	string strConn = "Provider=VFPOLEDB.1;Data source=d:\\temp\\testdata.dbc;";
	OleDbConnection cn = new OleDbConnection(strConn);
	cn.Open();
	OleDbCommand cmd = cn.CreateCommand();
        cmd.CommandType = CommandType.StoredProcedure;
	cmd.CommandText = "AddCustomer";
	cmd.ExecuteNonQuery();
        cn.Close();
    }
It worked. Each time I click I get a new customer.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform