iskey = false when i use cmd.ExecuteReader(CommandBehavior.keyinfo) mysql myoledb provider


************* Edited by moderator Adec *************** Inserted missing < code> tags. Always format your code and use tags when including code in your postings. Many readers disregard postings without the code tags. ************************************************** , I am trying to find the name of the keyfield of a table in mysql. (visual studio 2003 en iis5.0 en een web pagina asp.net) i am using the myoledb provider versie 3.0 for mysql (not the bytefx because i want to keep all my oledb commands i wrote already) I use myreader = cmd.ExecuteReader(CommandBehavior.SchemaOnly Or CommandBehavior.KeyInfo) and show all info in a grid. I notice that de "iskey" property is always set to False (even of all the field , included the actual key field) I use Provider=MySqlProv.3.0 (Because it is a mysql database accessed through oledb) In de mysql console the field "ID" of the table is marked with the 'key' icon and even autoincrement is turned on .But it remains "iskey" = false What could be the problem Is there another way to find the name of the keyfield of a table
Posted On: Wednesday 21st of November 2012 02:53:16 AM Total Views:  231
View Complete with Replies

RELATED TOPICS OF Oracle PROGRAMMING LANGUAGE




_system_trig_enabled = false?

Oracle 9.2.0.8 I am preparing to migrate a 9i database from DEC Alpha OSF/1, r1.1-8.1.0 to HP-UX B.11.23 U ia64. Due to the fact they are different platforms, I will need to do the export/import dance. My questions: 1) I would like to try a FULL import, do I need to set _system_trig_enabled = false 2) Is it possible at all to do the full import or do I need to import each schema separately
VIEWS ON THIS POST

141

Posted on:

Monday 24th September 2012
View Replies!

_optimizer_cost_based_transformation = off / _optimizer_push_pred_cost_based = false

, 3 questions: 1. What is the meaming of _optimizer_cost_based_transformation and _optimizer_push_pred_cost_based parameters 2. What is the consequences of setting the either one on the instance level 3. Is there an info source about hidden parameters, those starting with _
VIEWS ON THIS POST

165

Posted on:

Monday 24th September 2012
View Replies!

_gc_integrity_checks=false, meaning and effects

We have upgraded our 3 node RAC from 9.2.0.3 to 9.2.0.5, A week later we updated our code then we started getting ORA-00600: internal error code, arguments: [kclchkinteg_18], [], [], [], [], [],[], ] _gc_integrity_checks=false. The suggested work aro
VIEWS ON THIS POST

160

Posted on:

Monday 24th September 2012
View Replies!

_system_trig_enabled = false?

Oracle 9.2.0.8 I am preparing to migrate a 9i database from DEC Alpha OSF/1, r1.1-8.1.0 to HP-UX B.11.23 U ia64. Due to the fact they are different platforms, I will need to do the export/import dance. My questions: 1) I would like to try a FULL import, do I need to set _system_trig_enabled = false 2) Is it possible at all to do the full import or do I need to import each schema separately
VIEWS ON THIS POST

126

Posted on:

Wednesday 31st October 2012
View Replies!

_optimizer_cost_based_transformation = off / _optimizer_push_pred_cost_based = false

, 3 questions: 1. What is the meaming of _optimizer_cost_based_transformation and _optimizer_push_pred_cost_based parameters 2. What is the consequences of setting the either one on the instance level 3. Is there an info source about hidden parameters, those starting with _
VIEWS ON THIS POST

304

Posted on:

Friday 2nd November 2012
View Replies!

Searching Table for value and returning true/false

I have MySQL and ASP.NET setup and working great, however the lack of documentation/examples is making life a little difficult for me. I am currently trying to search through a table for an existing value and return a true or false value back to my ASP page for further computation. The pseudo code for what I am trying to accomplish is as follows (it is the "if username does not exist" part that I am having trouble with): If Username does not exist in database then \t Add userID and userName to database else \t Update IpAddress and IsOnline status The code I have so far (that doesn't work) is below: usingSystem; usingSystem.Data; usingSystem.Configuration; usingSystem.Collections; usingSystem.Web; usingSystem.Web.Security; usingSystem.Web.UI; usingSystem.Web.UI.WebControls; usingSystem.Web.UI.WebControls.WebParts; usingSystem.Web.UI.HtmlControls; publicpartialclassmain:System.Web.UI.Page { protectedvoidPage_Load(objectsender,EventArgse) { if(User.Identity.IsAuthenticated) { StringUserName=Membership.GetUser().ToString(); StringuserId=Membership.GetUser().ProviderUserKey.ToString(); StringHiveConnectionString="Database=hive;DataSource=localhost;UserId=hive_admin;Password=West7647"; StringUserExists=null; using(MySql.Data.MySqlClient.MySqlConnectionconn=newMySql.Data.MySqlClient.MySqlConnection(HiveConnectionString)) { MySql.Data.MySqlClient.MySqlCommandCheckcmd=newMySql.Data.MySqlClient.MySqlCommand( "SELECTUserNameFROMtrackerWHEREPKID=\tPKID"); Checkcmd.Parameters.Add("PKID",MySql.Data.MySqlClient.MySqlDbType.VarChar,255).Value=userId; Checkcmd.Connection=conn; conn.Open(); UserExists=Checkcmd.ExecuteScalar().ToString(); conn.Close(); if(UserExists==null) { MySql.Data.MySqlClient.MySqlCommandInsertcmd=newMySql.Data.MySqlClient.MySqlCommand( "INSERTINTOtracker(PKID,UserName,IpAddress,IsOnline)VALUES(PKID,\tIpAddress,\tUsername,1)"); Insertcmd.Parameters.Add("IpAddress",MySql.Data.MySqlClient.MySqlDbType.VarChar,15).Value=Request.UserHostAddress; Insertcmd.Parameters.Add("Username",MySql.Data.MySqlClient.MySqlDbType.VarChar,255).Value=UserName; Insertcmd.Parameters.Add("PKID",MySql.Data.MySqlClient.MySqlDbType.VarChar,255).Value=userId; Insertcmd.Connection=conn; conn.Open(); Insertcmd.ExecuteNonQuery(); conn.Close(); } else { MySql.Data.MySqlClient.MySqlCommandUpdatecmd=newMySql.Data.MySqlClient.MySqlCommand( "UPDATEtrackerSETIpAddress=\tIpAddress,IsOnline='1'WHEREUserName=\tUsernameANDPKID=\tPKID"); Updatecmd.Parameters.Add("IpAddress",MySql.Data.MySqlClient.MySqlDbType.VarChar,15).Value=Request.UserHostAddress; Updatecmd.Parameters.Add("Username",MySql.Data.MySqlClient.MySqlDbType.VarChar,255).Value=UserName; Updatecmd.Parameters.Add("PKID",MySql.Data.MySqlClient.MySqlDbType.VarChar,255).Value=userId; Updatecmd.Connection=conn; conn.Open(); Updatecmd.ExecuteNonQuery(); conn.Close(); } } } } } Could anyone give me advice on howto best do this
VIEWS ON THIS POST

179

Posted on:

Friday 2nd November 2012
View Replies!

True or false? (Indexes)

Hi , I have a pk index on 3 columns on a table col1 col2 col3. In my select I say select count(*) from table where col1=... and col2=....and col3=.... If I change the order and say Select count(*) from table where col3=... and col2 =.... and col3=.... Will it make any difference I read that if the select order is different from that of the index order, the select will not use that index....
VIEWS ON THIS POST

68

Posted on:

Sunday 4th November 2012
View Replies!

Oracle9i: why log_archive_start is false?

pls see the command results below, very confused why log_archive_start can't be set as 'true' I've tried some command such archive log start etc.. alter system set .... SQL>show parameter log_archive_start NAME TYPE VALUE log_archive_start boolean FALSE SQL>archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination d:\oracle\arc\arc2 Oldest online log sequence 38 Next log sequence to archive 40 Current log sequence 40
VIEWS ON THIS POST

115

Posted on:

Sunday 4th November 2012
View Replies!

_gc_integrity_checks=false, meaning and effects

We have upgraded our 3 node RAC from 9.2.0.3 to 9.2.0.5, A week later we updated our code then we started getting ORA-00600: internal error code, arguments: [kclchkinteg_18], [], [], [], [], [],[], ] _gc_integrity_checks=false. The suggested work aro
VIEWS ON THIS POST

258

Posted on:

Sunday 11th November 2012
View Replies!

Change in connection string causes mystery

- I changed my connection strings today to a different user/pass ("old_user" for the example) with less permissions on the DB. I also searched through my code to find all occurrences of the old user/pass and change them as well (Ctrl+F to find). When I try to debug, I get an error that INSERT command denied for 'old_user'@'' for table 'products'. I've tried looking everywhere (including web.config and modifying my xsd connection) but I can't find what generated this error. Search for the old user name in the entire project doesn't produce any hits either... I would appreciate any help -
VIEWS ON THIS POST

173

Posted on:

Tuesday 20th November 2012
View Replies!

How can i call a Oracle Function which return value is user defined record? SOS !!!!!

Package and Function: SPEC CREATE OR REPLACE PACKAGE PACKAGE_SUHUATEST AS type resp is record (resp_key varchar(30), app_name varchar2(15)); type resp_tab is table of resp INDEX BY BINARY_INTEGER; FUNCTION MyFunction(invar in varchar) return resp_tab ; END PACKAGE_SUHUATEST; / BODY CREATE OR REPLACE PACKAGE BODY MVL_SOX.PACKAGE_SUHUATEST AS FUNCTION MyFunction(invar in varchar) return resp_tab IS record1 resp; record2 resp; allresult resp_tab; BEGIN \t record1.resp_key :='key1'; \t record1.app_name :='name1'; \t \t record2.resp_key :='key2'; \t record2.app_name :='name2'; \t \t allresult(1) := record1; \t allresult(2) := record2; \t \t RETURN allresult; \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 RAISE; END MyFunction;
VIEWS ON THIS POST

172

Posted on:

Wednesday 21st November 2012
View Replies!

ODBC parameter for passing an inclause

I am connecting to a HP Nonstop SQL/MX database using its ODBC driver. Here are details 1. Created DataSet (VS 2008) using the wizard: - query: Select * from customers where name in () - Warning message: No mapping exists for DbType Object to a known OdbcType - Opened the Parameters Collection and changed the DbType to String. The corresponding OdbcType became 'NVarChar' 2. Clicked on 'Preview Data' for the query - Passed in ABCD as param value. The preview returned the corresponding record. 3. Clicked on 'Preview Data' for the query - Passed in 'ABCD','XYZ' as param value. The preview returned no records, even though there are corresponding records in the table. I did a few more tests and it seems that the '' parameter does not translate to literal string value that can be replaced in the query. e.g. if I pass 'ABCD','XYZ' , I want the query to be - Select * from customers where name in ('ABCD','XYZ') Defining the query as 'Select * from customers where name in (,)' works. But that is not an option as the number of parameters can change at runtime. How do I pass a variable list in an inclause Also, is it possible to pass a complete where clause as a parameter in case of dynamic queries Any ideas are appreciated.
VIEWS ON THIS POST

181

Posted on:

Wednesday 21st November 2012
View Replies!

setting up a true/false data type

Hi! Can someone please tell me how I can set up a check box data type. I amusing Mysqlwithin visual web developer. There is no boolen or yes/no datatype.Please help,can anyone explain how to set the data type\t\t\t\t\t\t/
VIEWS ON THIS POST

260

Posted on:

Wednesday 21st November 2012
View Replies!

Sample ASP code using user input parm into MySQL

I would appreciate any help displaying a sample ASP code that selects database elements from Mysql using a user input parm. My objective is to display database fields from a selected user input.
VIEWS ON THIS POST

132

Posted on:

Wednesday 21st November 2012
View Replies!

[HYT00] [MySQL][ODBC 3.51 Driver]Access denied for user

Hi Expert I have connection problems with my database when running my local computer in IIS server. I installed mySQL 4.0, MySQL Front and MYODBC 3.5 and configure everything. I ran in several other computers and it works fine, but not this particular computer. When I tried to retrieve the item, there is error: ERROR [HYT00] [MySQL][ODBC 3.51 Driver]Access denied for user 'XXX@'localhost' (using password: YES) Exception Details: System.Data.Odbc.OdbcException: ERROR [HYT00] [MySQL][ODBC 3.51 Driver]Access denied for user 'XXX'@'localhost' (using password: YES) Appreciate for your help!
VIEWS ON THIS POST

297

Posted on:

Wednesday 21st November 2012
View Replies!

How to use Oracle as backend for .Net appliations

Hi Guys If I want to use Oracle as my backend, wat configuration settings I need\t System.Data.SqlClient is there but not OracleClient. what namespace is required for my appliation
VIEWS ON THIS POST

116

Posted on:

Wednesday 21st November 2012
View Replies!

Access denied for user

Since moving my application to my ISP I am getting the following error message when trying to connect to the database. . . Access denied for user: 'myUserID@xx.xxx.xxx.xxx' to database 'myDataBase' The support say that have run a test script using all my connections details and that it works fine. Does anyone have any further ideas what might be causing this error.
VIEWS ON THIS POST

87

Posted on:

Wednesday 21st November 2012
View Replies!

ODP.NET: Function call with VARCHAR2 return value cause ERROR

Hi ALL , I am unable figure out the following problem.I am using VB.NET with ODP.NET 9.2.0.4 to access ORACLE 8i Database Server. While I am trying to call an Oracle function which returns a VARCHAR2 at the time of ExecuteNonQuery it generates the OracleExecption( "ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at line 1" ). But No problem occurs while function returns Number. Please help me to sort out this problem Oracle Function: ----------------------- FUNCTION Get_DATA1 (p_val IN VARCHAR2) RETURN VARCHAR2 IS v_val VARCHAR2(10); BEGIN v_val:=p_val; RETURN v_val; END Get_DATA1; VB.NET Function That accessing the Above function: ----------------------------------------------------------- Public Function GetData1() As String Dim strConnection As String Dim objConnection As OracleConnection Dim objCommand As OracleCommand Dim objParameterReturn As New OracleParameter Dim strReturnValue As String = "" Dim strValue As String="HELLO" Try strConnection = "My Oracle connection String" objConnection = New OracleConnection(strConnection) objCommand = New OracleCommand("Get_DATA1", objConnection) objCommand.CommandType = CommandType.StoredProcedure objCommand.Parameters.Add("p_val", OracleDbType.Varchar2, 10, strValue, ParameterDirection.Input) objParameterReturn = objCommand.Parameters.Add("retval", OracleDbType.Varchar2, 10, Nothing, ParameterDirection.ReturnValue) objCommand.Connection.Open() 'Upto connection open is working fine 'but ExecuteNonQuery casues the OracleException objCommand.ExecuteNonQuery() strReturnValue = CType(objParameterReturn.Value(), String) Catch ex As OracleException strReturnValue="Oracle Error" Catch ex As Exception strReturnValue="Other Error" Finally ''Release DB objects ReleaseDB(objCommand, objConnection) End Try Return strReturnValue End Function
VIEWS ON THIS POST

133

Posted on:

Wednesday 21st November 2012
View Replies!

How to use ODP.NET on aspx page (not in compiled code-behind)

Hi Folks. I'm trying to use the ODP.NET provider in an .aspx file in a block. The page is not part of a "project", does not have a code-behind page, is not compiled, and I am not using VS.NET for development. voidPage_Load(Objectsender,EventArgse) { OracleConnectioncon=newOracleConnection(); con.ConnectionString="UserId=usr1;Password=usr1;DataSource=ds1;"; } When I do that, I get the following error... "The type or namespace name 'Oracle' could not be found (are you missing a using directive or an assembly reference)" I know how to setup the reference to Oracle.DataAccess in VS.NET, but this page is not part of a compiled project/application. I don't know how to setup the reference in the .aspx file. Any ideas
VIEWS ON THIS POST

291

Posted on:

Wednesday 21st November 2012
View Replies!

How to display user's name once they login

can someone show me example how to check the user's name and diplay it once they login (mySQL & asp.net) Thnx
VIEWS ON THIS POST

108

Posted on:

Wednesday 21st November 2012
View Replies!