czeuch
Posts: 16
|
Posted: 07/09/2006, 8:48 AM |
|
Hello, I´ve few questions about programming with VB.NET in CCS:
1 - I´m using version 1.1 in framework. When I publish my project in a web server (host) and that server use framework 2.0, my project will works well?
2 - I´ve a hidden input, and I´ve input a DLookup action on the BeforeShow event of the hidden input. I selected the following values:
Expression: "customer_name"
Domain: "CUSTOMERS"
Criteria: "customer_id=1"
Connection: "cnn"
Convert result to: "Text"
Type of Target: "Control"
Target: "hiddenCustomerName"
The CCS have generated the following line of code:
hiddenCustomerName.Value = (New Field("",Settings.cnnDataAccessObject.ExecuteScalar("SELECT " & "customer_name" & " FROM " & "CUSTOMERS" & " WHERE " & "customer_id=1"))).GetFormattedValue("")
But this code gives a building error:
Error: C:\DOCUME~1\CHRIST~1\CONFIG~1\Temp\~PERSO~1\contato.aspx.vb(129) : error BC30002: Type 'Field' is not defined.
This happen in Send Email action too. I´ve selected the fields in the Property Toolbar and it gives me a lot of building errors. Why the CCS generate invalid code?
Thanks!
|
|
|
Diesel
Posts: 43
|
Posted: 07/11/2006, 4:00 AM |
|
Hi
Question 1:
You should have both Framework 1.1 and 2.0 installed on the target server to eliminate any discrepancies.
Question 2:
You should do the following:
I assume the target control is a hidden field. Furthermore I assume that the control name is CustomerName.
Therefore you only need to use the following:
Expression: "customer_name"
Domain: "CUSTOMERS"
Criteria: "customer_id=1"
Connection: "cnn"
Convert result to: "Text"
Type of Target: "Control"
Target: "CustomerName"
CCS will know that CustomerName is a hidden field.
=========================================
Let me know how it goes
|
|
|
czeuch
Posts: 16
|
Posted: 07/11/2006, 7:22 PM |
|
Thanks dude, but the name hiddenCustomerName is only an example. The line code generated by CCS keep with error. I solve by the following command line:
Settings.cnnDataAccessObject.ExecuteScalar("SELECT ustomer_name FROM CUSTOMERS WHERE customer_id=1")
Thanks!
|
|
|
|