Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ASP 2 detailsview and VFP
Message
From
07/02/2006 14:12:38
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
01091843
Message ID:
01094380
Views:
17
Tim,

Sorry I missed when you replied to me earlier ... I must have had the sound off on my computer. Anyway ....

>I assume this requires a detailsview and using your code, it bombed out in VWD, like on this statement:
>SqlDataSource1.InsertCommand.Parameters.Add("@title", title);<


You didn't say what the error message was. What is VWD? You may have to also include the OleDbDataType in the Parameter Add method.

~~Bonnie






>>You want to use ? instead of @parameters, but then you need to add the parameters to the OleDbCommand in the order they are used (in other words, in VFP's OleDb provider, parameters are positional, not named). Something like this:
>>
>> InsertCommand="INSERT INTO Products (ProductName, SupplierID, CategoryID,
>>        QuantityPerUnit, UnitPrice) VALUES (?,?, ?, ?,?)"
>>
>>MyInsertCommand.Parameters.Add("@ProductName", MyProduct);
>>MyInsertCommand.Parameters.Add("@SupplierID", MySupplierID);
>>MyInsertCommand.Parameters.Add("@CategoryID", MyCategoryID);
>>//etc.etc.etc.
>>
>>
>Bonnie, I guess to make this easier is to have the user fill out some textboxes then insert the values as a new record into the DBF (using vfpoledb naturally). I assume this requires a detailsview and using your code, it bombed out in VWD, like on this statement:
>SqlDataSource1.InsertCommand.Parameters.Add("@title", title);
>
>>
>>
>>
>>
>>>Anyone know how to apply an "insertcommand" in the detailsview? I am using VFPOLEDB to connect to the datasource. The examples I get always have the @var syntax as in this example:
>>>
>>> InsertCommand="INSERT INTO Products (ProductName, SupplierID, CategoryID,
>>> QuantityPerUnit, UnitPrice) VALUES (@ProductName,@SupplierID, @CategoryID, @QuantityPerUnit,CONVERT(money,@UnitPrice))">
>>>
>>>how does this apply to VFP table?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform