CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 invalid code generation

Print topic Send  topic

Author Message
wolf kumpitsch
Posted: 05/02/2002, 10:03 PM

when creating C# code, the following code is created in DataProvider.cs.
unfortunately, the Settings.DataAccessObject is incorrect (first part),
Settings.thingoDataAccessObject (second part) is correct.

also, the .net project contains a reference to Microsoft.Data.Odbc, which is
not available (supported?) on my machine

also: selecting an ODBC connection to MDB file fails with







----------------------------------------------------------------------------
-------------------------------------------------------------

//Record product Data Provider Class Variables @2-E0FFD129

protected DataCommand prod_prodcat_idDataCommand=new TableCommand("SELECT *
" +

"FROM ",new string[]{},Settings.DataAccessObject);

public IntegerParameter Urlprod_id;

//End Record product Data Provider Class Variables

//Record product Data Provider Class Constructor @2-08F34EC3

public productDataProvider()

{

Select=new TableCommand("SELECT * " +

"FROM product",new string[]{"prod_id7"},Settings.thingoDataAccessObject);










also: selecting an ODBC connection to MDB file fails with (selecting a
msaccess driver and specifying path works a little better)

----------------------------------------------------------------------------
------------------------------------

Server Error in '/intranet' Application.


----------------------------------------------------------------------------
----


An OLE DB Provider was not specified in the ConnectionString. An example
would be, 'Provider=SQLOLEDB;'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.ArgumentException: An OLE DB Provider was not
specified in the ConnectionString. An example would be,
'Provider=SQLOLEDB;'.

Source Error:

Line 17: public OleDbDao(ConnectionString
Connection):base(Connection.DateFormat,Connection.BoolFormat)
Line 18: {
Line 19: m_connection=new OleDbConnection(Connection.Connection);
Line 20: }
Line 21: public string Connection


Source File: C:\Inetpub\wwwintranet\components\CodeCharge.Data.OleDb.cs
Line: 19

Stack Trace:

[ArgumentException: An OLE DB Provider was not specified in the
ConnectionString. An example would be, 'Provider=SQLOLEDB;'.]
System.Data.OleDb.OleDbConnection.ValidateConnectionString(Hashtable
hashtable, String connectionString) +1431
System.Data.OleDb.OleDbConnection.set_ConnectionString(String value) +211
System.Data.OleDb.OleDbConnection..ctor(String connectionString) +164
intranet.Data.OleDbDao..ctor(ConnectionString Connection) in
C:\Inetpub\wwwintranet\components\CodeCharge.Data.OleDb.cs:19
intranet.Configuration.Settings.get_thingoDataAccessObject() in
C:\Inetpub\wwwintranet\components\Settings.cs:129
intranet.products.productDataProvider..ctor() in
C:\Inetpub\wwwintranet\components\productsDataProvider.cs:393
intranet.products.products.OnInit(EventArgs e) in
C:\Inetpub\wwwintranet\products.aspx.cs:489
System.Web.UI.Control.InitRecursive(Control namingContainer) +234
System.Web.UI.Page.ProcessRequestMain() +171





CodeCharge Support
Posted: 05/02/2002, 11:53 PM

Hello,

Regarding your error with invalid code in DataProvider:
It looks like you have not entered a valid connection/fieldsource for
prod_prodcat_id control (ListBox or RadioButton)

Regarding the error with ODBC provider:
ODBC is not a standard data provider in .NET and should be downloaded and
installed separately.
We use preprocessor directives when generating code with ODBC and this code
will not compile if you use OLEDB or MSSQL connection string.
It also looks like you have entered ODBC connection string in OleDb
connection string field (we have 3 separate fields in connection properties
for different providers).
We recommend using OleDb .NET provider because ODBC is not standard and code
that uses it may not work with all system configurations.

Konrad



"wolf kumpitsch" <wolf@thingo.co.nz> wrote in message
news:aat5nh$reo$1@news.codecharge.com...
> when creating C# code, the following code is created in DataProvider.cs.
> unfortunately, the Settings.DataAccessObject is incorrect (first part),
> Settings.thingoDataAccessObject (second part) is correct.
>
> also, the .net project contains a reference to Microsoft.Data.Odbc, which
is
> not available (supported?) on my machine
>
> also: selecting an ODBC connection to MDB file fails with
>
>
>
>
>
>
>
> --------------------------------------------------------------------------
--
> -------------------------------------------------------------
>
> //Record product Data Provider Class Variables @2-E0FFD129
>
> protected DataCommand prod_prodcat_idDataCommand=new TableCommand("SELECT
*
> " +
>
> "FROM ",new string[]{},Settings.DataAccessObject);
>
> public IntegerParameter Urlprod_id;
>
> //End Record product Data Provider Class Variables
>
> //Record product Data Provider Class Constructor @2-08F34EC3
>
> public productDataProvider()
>
> {
>
> Select=new TableCommand("SELECT * " +
>
> "FROM product",new string[]{"prod_id7"},Settings.thingoDataAccessObject);
>
>
>
>
>
>
>
>
>
>
> also: selecting an ODBC connection to MDB file fails with (selecting a
> msaccess driver and specifying path works a little better)
>
> --------------------------------------------------------------------------
--
> ------------------------------------
>
> Server Error in '/intranet' Application.
>
>
> --------------------------------------------------------------------------
--
> ----
>
>
> An OLE DB Provider was not specified in the ConnectionString. An example
> would be, 'Provider=SQLOLEDB;'.
> Description: An unhandled exception occurred during the execution of the
> current web request. Please review the stack trace for more information
> about the error and where it originated in the code.
>
> Exception Details: System.ArgumentException: An OLE DB Provider was not
> specified in the ConnectionString. An example would be,
> 'Provider=SQLOLEDB;'.
>
> Source Error:
>
> Line 17: public OleDbDao(ConnectionString
> Connection):base(Connection.DateFormat,Connection.BoolFormat)
> Line 18: {
> Line 19: m_connection=new OleDbConnection(Connection.Connection);
> Line 20: }
> Line 21: public string Connection
>
>
> Source File: C:\Inetpub\wwwintranet\components\CodeCharge.Data.OleDb.cs
> Line: 19
>
> Stack Trace:
>
> [ArgumentException: An OLE DB Provider was not specified in the
> ConnectionString. An example would be, 'Provider=SQLOLEDB;'.]
> System.Data.OleDb.OleDbConnection.ValidateConnectionString(Hashtable
> hashtable, String connectionString) +1431
> System.Data.OleDb.OleDbConnection.set_ConnectionString(String value)
+211
> System.Data.OleDb.OleDbConnection..ctor(String connectionString) +164
> intranet.Data.OleDbDao..ctor(ConnectionString Connection) in
> C:\Inetpub\wwwintranet\components\CodeCharge.Data.OleDb.cs:19
> intranet.Configuration.Settings.get_thingoDataAccessObject() in
> C:\Inetpub\wwwintranet\components\Settings.cs:129
> intranet.products.productDataProvider..ctor() in
> C:\Inetpub\wwwintranet\components\productsDataProvider.cs:393
> intranet.products.products.OnInit(EventArgs e) in
> C:\Inetpub\wwwintranet\products.aspx.cs:489
> System.Web.UI.Control.InitRecursive(Control namingContainer) +234
> System.Web.UI.Page.ProcessRequestMain() +171
>
>
>
>
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.