Datasource In Mysql.. Not in Odbc


Hi , i Am new to the MySql Database usage in asp.net , after alot of probleams to set it up , i now having another probleam. fierst of all i cant use the odbc connectorbecuse its shoing me qustion mark , i am using utf-8 and the odbc connector dont support utf8 correctly. i need a way to use the mysql.data as my provider but if i'll try to use it it show me this thing.. Index (zero based) must be greater than or equal to zero and less than the size of the argument list. so pleas help me out here. tnx, and sorry for my english.
Posted On: Wednesday 7th of November 2012 11:20:40 AM Total Views:  81
View Complete with Replies

RELATED TOPICS OF Oracle PROGRAMMING LANGUAGE




1 Gridview table with 2 datasources

I have Gridview that pulls data from a MYSQL datasource. I need to pull in 3 more columns from a Oracle datasource. So, joining the tables via SQL is out. I need 3 columns without hitting the source multiple times for the same record. Look up the oracle data during the "Databound" event of Gridview How then do I make the link with the Oracle table to the templates Examples would be great you know of one.
VIEWS ON THIS POST

162

Posted on:

Friday 2nd November 2012
View Replies!

Stored procedure as grid datasource, no results

Hi all, I tried to get help on another forum (here) but to no avail. I am trying to call a stored procedure on my Oracle 11g database: (Note - I had previously attempted to use a SqlDataSource control for the data source, but I wasn't getting anywhere. Would that have been a better choice) This executes without error, but then my grid just says "No records to display." I can't figure out why, because the query is returning results.
VIEWS ON THIS POST

86

Posted on:

Friday 2nd November 2012
View Replies!

how to use multiple database datasource in asp.net

Hi all, How to use multiple datasource in asp.net I mean, I try to develop an application in asp.net with oracle but which also support sql server , mysql database. User can decide which database he/she can use. Could anyone help me about it
VIEWS ON THIS POST

156

Posted on:

Friday 2nd November 2012
View Replies!

Bind datasource to textbox or label

I need to check a database value on some condition . One of the condtion is to check the value against another databse values. So that I want to retrieve the second database value in to a textbox or label. I have the following mysqldatasource and want to display that in a textbox or label I tried to retrieved and nothing is bound to the textbox. I am writing the code in vb.net Thank you.
VIEWS ON THIS POST

171

Posted on:

Friday 2nd November 2012
View Replies!

.net 2.0 sqldatasource dynamic parameters using oracle

I am working on converting a.NET 1.1 project to 2.0. I have a usercontrol with a datagrid on it.On this user controlI have a set list of select fields (ie name, address etc) But I have a public properyt that I use for the whereby and sortby clauses. I do this so the page usigin the usercontrol can specify the where by clause and order by clause. I am trying to do this in 2.0 using the SQLdatasource and the gridview control. I like to do as much as possible in the code behind, but it seems like the datasource conrol needs to be on the aspx page. Basically I have a sqldatasource on the aspx page with a string selectparameter. I want to set this select parameter to my where clause. Example \t\t\t\t\t \t\t\t\t\t \t\t I have several methods including this code in the page load SqlDataSource1.SelectParameters[0].DefaultValue = " personnelID = 1234 " SqlDataSource1.SelectParameters[1].DefaultValue = "lastname desc" or in the SqlDataSource1_Selected method adding an oracle parameter OracleParameter pm = new OracleParameter("IN_ID","41311"); e.Command.Parameters.Add(pm); So I haven't been able to get anything to work. Anyone have any suggestions. THanks in advance Jeff
VIEWS ON THIS POST

180

Posted on:

Friday 2nd November 2012
View Replies!

SQLdatasource + gridview + mysql

I have a sqldatasource and a gridview. I work with a mysql 3.51 database. My problem is : When I try tu update a record through the update command of the gridview, it doesn't work. Here is my code : Voici votre panier : Actuellement, votre panier ne contient aucun produit. The select command works but not the update command!!!! Can you help me please
VIEWS ON THIS POST

390

Posted on:

Friday 2nd November 2012
View Replies!

write to database with sqldatasource&dataview

, help the newbie! How to add a row in existing database table I've got asp.net 3.5 web application connecting to Oracle database. I use sqldatasource component to retrieve and display data. I use dataView for sorting and searching. works fine. Then I come to point I need write a new row. I do this: DataView dv = (DataView)DataSource.Select(DataSourceSelectArguments.Empty); DataRowView dr = dv.AddNew(); dr.BeginEdit(); dr["Column1"]=value1; dr["Column2"]=value2; dr["Column3"]=value3; dr.EndEdit(); While debugging I can see the new record in dataView visualizer, but there is no data in database after all. Is this even the correct way to do it Should I be using some other classes/components
VIEWS ON THIS POST

233

Posted on:

Friday 2nd November 2012
View Replies!

using stored proc in sql datasource

I've created a simple stored procedure in oracle. because i am still on the learning stage. below is the code create or replace PROCEDURE TEST1 (var_date OUT qa_claim.DATE_EFFECT%Type) IS BEGIN SELECT to_char(DATE_EFFECT) INTO var_date FROM QA_CLAIM; END; I have compile it, & there are no errors. but when I use a sqldatasource to a grid, it displays an error ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'TEST1' ORA-06550: line 1, column 7: PL/SQL: Statement ignored what seems to be the problem
VIEWS ON THIS POST

171

Posted on:

Friday 2nd November 2012
View Replies!

oracle datasource selected data differs from external tool results

I have an odd problem. The select statement I'm using in my SqlDataSource works fine in external tools like TOAD or sqlplus, but fails to return any data inside the data source. One of my parameters allows a null value. When it is null, no data is returned by the data source, but anywhere else it works fine. Here is the statement. select distinct a.proj_id,a.csact,a.wpkg,a.celt,a.curp,a.newp,a.pmc,a.des1,e.des3 from av_work_package a, av_value c, av_value_detail d, av_cost_account e where a.proj_id = :projectId and c.proj_id = a.proj_id and d.proj_id = c.proj_id and e.proj_id = a.proj_id and (:analyst is null or :analyst = '' or e.des3 like :analyst||'%') and a.csact like UPPER(:ctrlAccount)||'%' and e.csact = a.csact and a.wpkg like UPPER(:workPackage)||'%' and a.celt like UPPER(:celt)||'%' and (a.pmc like UPPER(:npmc)||'%' or a.pmc = :npmc) and (not a.pmc in ('D', 'P', 'J', 'F', 'H', 'G')) and c.csact = a.csact and c.wpkg = a.wpkg and d.valid = c.valid and d.ctype = 'B2' order by 2, 3 The :analyst parameter is the one that gets a NULL value on occasion. When it does the odd behavior occurs. This even occurs when configuring the data source. I execute the statement and it gets the same result as TOAD or sqlplus, but fails to return any data at runtime. The value of the parameter is being supplied by a drop down list with the first item an empty string, hence the test for null or ''. The environment includes atlas which provides client side update of the dropdownlists, but not the gridview.
VIEWS ON THIS POST

202

Posted on:

Saturday 3rd November 2012
View Replies!

datasource in mysql

Itestedsome code and database is set up in mysql. Below is the code. But I have errors in these lines: Sorting Data Using GridView \t \t\t \t\t\t \t\t\t \t\t\t \t\t\t \t\t\t\t \t \t Appreciate it!
VIEWS ON THIS POST

103

Posted on:

Wednesday 7th November 2012
View Replies!

Connect datasource to iSeries DB2 ?

I am trying to connect from a asp.net application to iSeries DB2 UDB. Although I can connect easily specifying the connection parameters manually like DataSource=10.1.1.2;userid=mike;password=test123;L ibraryList=test,*USRLIBL;DefaultCollection=TEST;Co nnectionTimeout=60;" providerName="IBM.Data.DB2.iSeries" But whenever I try to bind any datasource inside my application lets say a new SQL data source to browse the tables with a new connection then I get a communication error on configuring the datasource. Error [08001] [IBM] SQL30081N. A communication error has been detected. Communication API being used 'SOCKETS'. Location where the error was detected "10.1.1.2". Communication function detecting the error "connect". Protocol specific error code "10061". Please help as I have to connect all my gridviews inside my application and manually doing that would take ages.
VIEWS ON THIS POST

72

Posted on:

Wednesday 7th November 2012
View Replies!

formview - sqldatasource - oracle stored procedure doesn't populate output variable

I have a stored procedure that inserts a row into a table. It has as an output a variable where I place the primary key id of the inserted row: CREATE OR REPLACE PROCEDURE IUA_MAIN.INTEGRATION_INSERT \t ( p_intname\t\t\t IN VARCHAR2 \t , p_requserid IN VARCHAR2 \t , p_status IN VARCHAR2 \t , p_description IN VARCHAR2 \t ,tmpVar OUT INTEGER) IS newID INTEGER; BEGIN newID :=0; \t select int_id_seq.nextval into tmpVar from dual; \t \t INSERT INTO INTEGRATION (INT_ID,INT_NAME,REQ_USERID,STATUS,ORG_INT_ID,DESCRIPTION) \t VALUES (tmpVar,p_intname,p_requserid,p_status,null,p_description); \t COMMIT; \t \t EXCEPTION \t\t WHEN NO_DATA_FOUND THEN \t\t\t NULL; \t\t WHEN OTHERS THEN \t\t\t -- Consider logging the error and then re-raise \t\t\t NULL; END INTEGRATION_INSERT; / On the Inserting event of the sqldatasource I do: ProtectedSubSqlDataSource1_Inserting(ByValsenderAsObject,ByValeAsSystem.Web.UI.WebControls.SqlDataSourceCommandEventArgs)HandlesSqlDataSource1.Inserting \t\t\t\tDimoParamAsNewSystem.Data.OracleClient.OracleParameter() \t\t\t\toParam.ParameterName="tmpVar" \t\t\t\toParam.DbType=Data.DbType.Int32 \t\t\t\toParam.Direction=Data.ParameterDirection.Output \t\t\t\toParam.Value=0 \t\t\t\te.Command.Parameters.Add(oParam) \t\tEndSub I can see from SQL Monitor that the correct number of parameters are being passed to my stored proc but in the Inserted event, the output is never populated from the stored proc. Running manually in sql plus works just fine. Formally the error I get is: PLS-00306: wrong number or types of arguments in call to 'INTEGRATION_INSERT'
VIEWS ON THIS POST

251

Posted on:

Wednesday 7th November 2012
View Replies!

sqldatasource and mysql

How do you connect a sqldatasource and mysql DB with the wizard. i looked at ODBC connection but found no driver for mysql
VIEWS ON THIS POST

379

Posted on:

Wednesday 7th November 2012
View Replies!

looped insert on sqldatasource control

Just getting started with asp.net and c#. Is there a better way to do this (see below) VS 2008, C#, MySQL .net connector 5.2, MySQL server 5.x, SQL Server Express I spent last night manually writing code to take data from mutiple database fields from multiple tables in a MySQL database, then insert the data into a SQL Server database, with a different structure. I could not figure out a fast or easy way to do this in asp.net. So I wound up writing it all manually using: ------------------ MySqlConnection, MySqlCommand, writing the query and connection string, opening the connection, using MySqlDataReader to get the results, then: while (myReader.Read()) using SqlConnection, SqlCommand, etc Then assigning the fields to parameters here. writing an insert query that uses the parameters Then open the db, ExecuteScalar, close the db //end while Then closing the reader and the MySQL database. ------------------- It seems there has to be an easier way. Isn't there anything like: Use a SqlConnection(1) control, with a select (with DataReader) to take care of the db connection dirty work. Then use another SqlConnection(2) control, with an Insert. Where the SqlConnection(2) control is DataBound to the SqlConnection(1) control. Is there any way to do something like this Shouldn't there be a way to do something like this I am using different databases, with different connectors and different stuctures. So I don't think anything like Select INTO would work. Creating a .sql from the MySQL fields an importing the .sql into SQL server does not seem like any less work when it comes to writing the code, and creating and importing a .sql does not seem like a very elegant solution. Is there any easier way to do all of this, by draging around some controls. Then writing SOME code. Instead of writing it all manually
VIEWS ON THIS POST

202

Posted on:

Wednesday 7th November 2012
View Replies!

query error in where clause using SQLdatasource with control parameter in MySQL

hi frendz... \t how can i query the mysql databse having where clause query and the where clause parameter selects from textbox control.. i.e: \t\t\t \t\t\t\t\t \t\t\t\t \t \t \t plz help friendz
VIEWS ON THIS POST

210

Posted on:

Wednesday 7th November 2012
View Replies!

problem using gridview with Visual Foxpro datasource

I am connecting to a Visual Foxpro database in VWD2005. I have dragged a gridview control onto the design surface and stepped through the wizard to create an OLEDBdatasource etc. The problem I have is that the data being returned is just the fieldnames. The actual data does not seem to be returned. I think this could be because the select statement being generated has all of the fieldnames wrapped in square brackets [] as when I select * for all fields this isn't a problem but it takes forever to get the data. Has anyone else come across this problem using VWD2005 with accessing Visual Foxpro data via OLEDB provider
VIEWS ON THIS POST

202

Posted on:

Wednesday 7th November 2012
View Replies!

sqldatasource passing parameter

I want to pass a string as parameter in the following SqlDataSource which is in turn connected to a Listview/ Gridview It fails when I use IN operator in the command,, but it runs properly if I use a = operator ------------------------------------------ \t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t \t\t\t\t\t ---------------------------------------------------- SqlDataSource1.SelectParameters["strquery"].DefaultValue ="'1','2','3'".ToString(); --------------------------------------------------- Please help!! What are the other operators... like , CONTAINS
VIEWS ON THIS POST

315

Posted on:

Wednesday 7th November 2012
View Replies!

Copy table with schema from ODBC datasource to MSSQL Database

I've been looking around and haven't found any information that addresses my problem... I'm hoping someone here may have some insight... I am attempting to use .net tocopy a table from an ODBC data source (specifically a PervasiveSQL database) to a MSSQL database. I would like to keep the table schema as intact as possible. I've seen some examples out there that use SMO to copy a table from one MSSQL DB to another, but since I can't use SMO to get the source table, I'm having difficulty populating the schema/data of the destination table (of type Microsoft.SqlServer.Management.Smo.Table). So at this pointI know how to populate a DataTable form an ODBC data source, and I know how to create/populate a table in the MSSQL database usingMicrosoft.SqlServer.Management.Smo.Table but I'm not sure how to (if I can) bridge the gap between the DataTable and the SMO Table. Maybe I'm headed down the wrong road with this approach. Hopefully someone out there has tried this before. Any suggestions
VIEWS ON THIS POST

91

Posted on:

Wednesday 7th November 2012
View Replies!

odbc connection problem with webservice!!URGENT!!!

I'm trying to access to a webservice with my web aplication. I use ODBC to do the connection to the database. I add the connection to the ODBC in the Administrative tools, when I reference it on my web aplication it works perfectly, but, when I add the code to the webservice to try, it does not work. My method to do this returns true or false as the conditions are testes, but it always returns false. I tryed with sql and it worked just fine, but the projecto requires ODBC!Help me, it's urgent!!! The code may help: public Service () \t { \t\t\t InitializeComponent(); \t } \t private void InitializeComponent() \t { \t\t\t this.odbcConnection = new OdbcConnection(); \t\t\t odbcConnection.ConnectionString = "dsn=mydsn;uid=sa;pwd=sasa"; \t\t\t this.dataSet1 = new DataSet(); \t\t\t ((System.ComponentModel.ISupportInitialize)(this.dataSet1)).BeginInit(); \t\t\t this.dataSet1.DataSetName = "NewDataSet"; \t\t\t ((System.ComponentModel.ISupportInitialize)(this.dataSet1)).EndInit(); \t } \t [WebMethod] \t public bool registarUtilizador(string tipo, string utilizador, string passwd, string eMail) \t { \t\t\t \t\t\t odbcComando = new System.Data.Odbc.OdbcCommand("novoRegisto '"+tipo+"', '"+utilizador+"', '"+passwd+"', '"+eMail+"'",odbcConnection); \t\t\t try \t\t\t { \t\t\t\t\t \t\t\t\t\t odbcConnection.Open(); \t\t\t\t\t odbcComando.ExecuteNonQuery(); \t\t\t\t\t return true; \t\t\t } \t\t\t catch \t\t\t { \t\t\t\t\t return false; \t\t\t } \t\t\t finally \t\t\t { \t\t\t\t\t odbcConnection.Close(); \t\t\t } \t } I did not present the using and the declarations of the variables but those parts are fine!!!Thks
VIEWS ON THIS POST

289

Posted on:

Wednesday 7th November 2012
View Replies!

problems connecting to mysql db with odbc

, i am trying to learn how to connect my asp.net page to my mysql database. my hosts have the odbc driver installed but i have tried connecting and i am not having much luck. The biggest problem is that they do not have debug mode enabled and therefore i don't get any error messages :( here is the code i am using to try to connect and retrieve the information, if anyone can help that woul dbe appreciate. code ------------------------------ Function Testing() As System.Data.Odbc.OdbcDataReader Dim connectionString As String = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=customers;USER=auser;PASSWORD=test;OPTION=3;" Dim OdbcConnection As System.Data.Odbc.OdbcConnection = New System.Data.Odbc.OdbcConnection(connectionString) Dim queryString As String = "SELECT [Custlist].[FirstName], [Custlist].[LastName], [Custlist].[CustomerID] "& _ "FROM [Custlist]" Dim OdbcCommand As System.Data.Odbc.OdbcCommand = New System.Data.Odbc.OdbcCommand(queryString, OdbcConnection) OdbcConnection.Open Dim dataReader As System.Data.Odbc.OdbcDataReader = OdbcCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection) Return dataReader End Function Sub Page_Load(sender as Object, e as EventArgs) people.DataSource = Testing() people.DataBind() End Sub -----------------------------------
VIEWS ON THIS POST

219

Posted on:

Wednesday 7th November 2012
View Replies!