Anyone able to help?


I am having a slight problem with an sql procedure im trying to create, keep getting an error saying "encountered ;, while expecting the following: if" could anyone help

CREATE OR REPLACE PROCEDURE CustOrders(
iCust IN NUMBER
)
AS
CurrentRow OrderCursor%ROWTYPE;
oCompany VARCHAR2(15);

CURSOR OrderCursor IS
SELECT Description, Amount
FROM Products, Orders
WHERE iCust = Cust;
BEGIN

SELECT Company
INTO oCompany
FROM Customers
WHERE iCust = CustNum;

IF SQL%NOTFOUND THEN
DBMS_OUTPUT.PUT_LINE ("Customer " || oCompany || " was not found.");

ELSE IF SQL%FOUND THEN

SELECT OrderNum
FROM Orders
WHERE CustNum = Cust;

IF SQL%NOTFOUND THEN
DBMS_OUTPUT.PUT_LINE(oCompany || " has no orders recorded.");
ELSE IF SQL%FOUND THEN

DBMS_OUTPUT.PUT_LINE("Orders For " || iCust || oCompany);
DBMS_OUTPUT.PUT_LINE("Description Amount");
FOR CurrentRow IN OrderCursor
LOOP
DBMS_OUTPUT.PUT_LINE (CurrentRow.Description || " " || CurrentRow.Amount);
END LOOP;

END IF;
END IF;
END;
/
SHOW ERRORS
Posted On: Monday 31st of December 2012 01:14:32 AM Total Views:  328
View Complete with Replies

RELATED TOPICS OF Oracle PROGRAMMING LANGUAGE




What happend to the archive threads?????

I was looking forward to answer the question of "What is oracle" by refering to a past discussion. But when I tried to do a search on the archive, I noticed that Year 2000 archive threads have been combined or missing ( didn't have the patience to keep next paging till Dec/Jan). Does any one have any idea on this I would think that archiving the past threads by year, was a good thing rather consolidationg every thing into one. It would narrow the search and also ease the look outs. Please suggest if there are any other better way to start my search with the archived threads before Jan. Sam
VIEWS ON THIS POST

208

Posted on:

Wednesday 7th November 2012
View Replies!

Where are those views coming from

Checking Database today , Found lots of view [TABLE_NAME]_BASE [TABLE_NAME]_BPKC [TABLE_NAME]_CONF [TABLE_NAME]_BASE [TABLE_NAME]_LOCK [TABLE_NAME]_PKC [TABLE_NAME]_PKD [TABLE_NAME]1 ..... Where are those views coming from Those views looks like generated by system
VIEWS ON THIS POST

150

Posted on:

Wednesday 7th November 2012
View Replies!

Table name with funny characters

RDBMS Version: 10g Enterprise Edition Release 10.1.0.2.0 This is my first experience creating a database on 10g. I tested first by creating a test table and I dropped the table immediately after creating. Next I proceeded to create the actual table (section) and it was successful. When I did a check on the user_tables this is what I get (a table_name with multiple characters) just below the section table, SQL> select table_name from user_tables; TABLE_NAME ------------------------------ SECTION BIN$CHcMxT2qRmOuePUzHW8BcQ==$0 I never created them and I am wondering what this is. Is something wrong somewhere How do I remove that Why does this happen Appreciate any advice.
VIEWS ON THIS POST

315

Posted on:

Wednesday 7th November 2012
View Replies!

Standby Database

When I attempt to start up my standby database after activating it, I receive the following error: ORA-01190: controlfile or data file 1 is from before the last RESETLOGS. ORA-01110: data file 1: '/v01/oradata/prod/system01.dbf' I suppose the data files on the standby would be older then the last RESETLOGS since it does a RESETLOG logs automatically when you issue the ACTIVATE STANDBY command. Does something need to be done to the datafiles on the standby before you can activate the standby I do have all of the archived redo logs applied. Any insight would be greatly appreciated.
VIEWS ON THIS POST

59

Posted on:

Wednesday 7th November 2012
View Replies!

Replicating a database across network

all - can anyone advise me I've got a database on an E10k domain, with a very high bandwidth link to another (target) domain. I've installed Oracle onto the target domain, with another database (same version), with differing file paths and a different name (to replicate a situation in live). Can anyone tell me how I can best replicate the contents of the database onto the target in order to minimise downtime and make most effective use of the high bandwidth link Can you do a 'back to back' RMAN across the link Any advice welcome. Many
VIEWS ON THIS POST

137

Posted on:

Wednesday 7th November 2012
View Replies!

Timed statistics

I am working as a DBA on Oracle 7.2.3 on Unix. How can I change the parameter timed_statistics parameter dynamicallyI have tried alter system set option but its giving illegal set option. Or is it not possible to change the parameter dynamically in Oracle 7.2.3
VIEWS ON THIS POST

322

Posted on:

Wednesday 7th November 2012
View Replies!

Semaphore

Hi , What is a semaphore Can anyone guide me to links that contain info about Unix systems with respect to Oracle
VIEWS ON THIS POST

46

Posted on:

Wednesday 7th November 2012
View Replies!

GridView filter with OracleDbType.Date parameter question

Hi all I am trying tousethe following parameter to filter my gridview: cmd.Parameters.Add(":PMSGID", OracleDbType.Date).Value = '%'; I am having an issue because the OracleDbType.Date parameter will not accept the wildcard. The table column itself is a datetime column, and if I query using a wildcard it works fine. Does anyone know what can be done in .net (C#) to use a wildcard parameter for the date
VIEWS ON THIS POST

152

Posted on:

Wednesday 7th November 2012
View Replies!

using System.Data.OracleClient;

hi, i want to access oracle 10g server database which ison other machine (lan)without installing any oracle client software in my .aspx and .cs pages. Is it possible \t. i am trying to use System.Data.OracleClient. will itrequire oracle client software in my machine or is their any alternate method like oraclelite or any other option..
VIEWS ON THIS POST

238

Posted on:

Wednesday 7th November 2012
View Replies!

QuestionHow get output from Oracle DB returns RefCursor?

Hi I hvae typed DataSet contains some stored pocedures one of them returns RefCursor like this: GetDataById(Id, out RefCurso) how can I set type of returned type (RefCursor returns recordset) I want to use DataSet or DataTable inside this function to catch output from Oracle stored procedure... I looking for some thing like this DataSet DS= new DataSet(); GetDataById(10, DS)
VIEWS ON THIS POST

221

Posted on:

Wednesday 7th November 2012
View Replies!

Materialized View Log

I have created a materialized log for a table. T_enterprise_track Table T_enterprise_track_id, service_id, track_no, status_id, last_accessed_time, activity_id The column last_accessed_time is updated 30 times a sec. for the new inserted record. My materialized view contains one column from that table (status_id), which has less updates. My Materialized view log size will become huge. Since it log unwanted changes Is there a way to log the fields which selected in the materialized view only not all columns. I have tried CREATE MATERIALIZED VIEW LOG ON t_enterprise_track WITH ROWID, (service_id, track_no, status_id) INCLUDING NEW VALUES; CREATE MATERIALIZED VIEW LOG ON t_enterprise_track WITH ROWID, SEQUENCE(service_id, track_no, status_id) INCLUDING NEW VALUES; http://www.cise.ufl.edu/help/databa...64a.htm#2098359 Did not work, still when changing the last_accessed_time the log file get populated with data.
VIEWS ON THIS POST

65

Posted on:

Wednesday 7th November 2012
View Replies!

HELP! using mysql .net ODBC data provider as backend for excel 2000 automation..

Ok, here's the deal. I am trying very hard to use MySQL as a backend for ASP.NET development (which works fine), and trying to create a reporting section that generates excel reports using Excel 2000. Has anyone tried this and is it feasible. Needless to say I am running into all sorts of problems. The MySQL odbc .net provider works fine and is able to connect to the database. for all other regular asp.net programming. eg. populating listboxes, databinding the datagrids, datasets etc. works perfectly. Enter excel 2000 reports; I have tried automating this through ASP.NET but it gives me a lot of COM exception type errors. I added a reference to the Excel 10.0 library in my visual studio.net solution, and its imported Excel, Office and something called VBIDE as references. Now, I am able to write to an excel cell using automation but not when the query is from the database. However the same thing works from within the actual Excel application (when its not automated.) I am confused about whether: 1. Something is wrong with the MySQL driver when automating excel 2. Something is wrong with trying to automate Excel 2000 using ASP.NET anyone with any knowledge about this please enlighten me,
VIEWS ON THIS POST

259

Posted on:

Wednesday 7th November 2012
View Replies!

[RMAN8i] Backups retention

Hi everybody and Happy New Year I have the following problem : I want to delete some of my old backupsests. The script below is the spool of an SQL script that is run against RMAN. May some one help me to understand.
VIEWS ON THIS POST

100

Posted on:

Sunday 11th November 2012
View Replies!

what does this event do - 22825 ?

I have found that one user is issuing command "ALTER SESSION SET EVENTS '22825 TRACE NAME CONTEXT FOREVER, LEVEL 1'". Can anyone tell what is purpose of using this event what does it do on level 1 Is it good for issuing this staement every day Deba
VIEWS ON THIS POST

268

Posted on:

Monday 12th November 2012
View Replies!

Turn DISPLAY off

When I use SQL*PLUS to run queries, it takes a quite while to display the returned row result. I was wondering if there is an option to turn DISPLAY off.
VIEWS ON THIS POST

79

Posted on:

Thursday 15th November 2012
View Replies!

Triggers Failing need help

My trigger is created like such: CREATE OR REPLACE TRIGGER ICTL BEFORE INSERT OR UPDATE ON WWOLSR.CTL FOR EACH ROW DECLARE TIME_NOW DATE; TERMINAL CHAR(20); BEGIN TIME_NOW :=SYSDATE; TERMINAL :=USERENV ('TERMINAL') IF INSERTING THEN INSERT INTO WWOLSR.ICTL VALUES (:NEW....BLAH BLAH BLAH IT FAILS WITH THE FOLLOWING ERROR: PLS-00201 IDENTIFIER 'ICTL' MUST BE DECLARED I have the same exact trigger running on another server and it is fine. Any ideas please help
VIEWS ON THIS POST

215

Posted on:

Thursday 15th November 2012
View Replies!

rollback segments

I am having this problem on the production server. The error is Failure to extend rollback segment 3 because of 1562 condition Failure to extend rollback segment 3. How Do I sort out this error. I just made the segment bigger than the way it way before.
VIEWS ON THIS POST

274

Posted on:

Thursday 15th November 2012
View Replies!

MySql

...
VIEWS ON THIS POST

86

Posted on:

Tuesday 20th November 2012
View Replies!

Read a big XML file with oracle

Good nigth everybody, I have a problem and i will appreciate some help. What I need I need to read a XMLfile with 8,2 Gb, using oracle PLSQL The problem When I started to read the XML file i got the message:\tORA-29554: unhandled Java out of memory condition\t Itried to do a test with a XML with 5 Mb, in this case the process was finished with sucessful. I would like to know if is possible to reada big XML file (8,2 GB)in oralce using PLSQL or another toolwithouterror.
VIEWS ON THIS POST

229

Posted on:

Tuesday 20th November 2012
View Replies!

First time using MySql - Index out of range

Hi I am trying to connect to MySql Database, and fill a DataSet with serveral tables. (MySql v 5.0) Here's my code: Dim objDS As DataSet = New DataSet() Dim objConn As OleDbConnection = New OleDbConnection(ConfigurationManager.ConnectionStrings("conn").ConnectionString) Dim objCmd As OleDbCommand = New OleDbCommand objCmd.Connection = objConn objCmd.CommandType = CommandType.Text Try Dim objDA As OleDbDataAdapter = New OleDbDataAdapter(objCmd) objDA.SelectCommand = objCmd objCmd.CommandText = "SELECT aID AS itemID, aName AS itemName FROM PRD_A WHERE deleted = 0 ORDER BY sortOrder, areaName;" objDA.Fill(objDS,"level1") objCmd.CommandText = "SELECT tID AS itemID,tName AS itemName FROM PRD_T WHERE deleted = 0 ORDER BY sortOrder, typeName;" objDA.Fill(objDS,"level2") objCmd.CommandText = "SELECT sID AS itemID,sName AS itemName FROM PRD_S WHERE deleted = 0 ORDER BY sortOrder,seriesName;" objDA.Fill(objDS,"level3") objCmd.CommandText = "SELECT bID AS itemID,bName AS itemName FROM PRD_B ORDER BY sortOrder,brandName;" objDA.Fill(objDS,"level3") objCmd.CommandText = "SELECT pID As itemID,pName AS itemName FROM PRD_P ORDER BY sortOrder,powerType;" objDA.Fill(objDS,"level4") Return objDS Catch ex As Exception I getthe following error: System.IndexOutOfRangeException: Cannot find table 0. Kindly help. Thank you
VIEWS ON THIS POST

254

Posted on:

Wednesday 21st November 2012
View Replies!

to Calculated Columns, then to update another column in same table in ADO.NET

toget severalColumns, then pass those Columns into one function which will return a result, then using the result to update another column in same table in ADO.NET, How can I do this
VIEWS ON THIS POST

237

Posted on:

Wednesday 21st November 2012
View Replies!

Oracle Sequences

I'm using a sequence to generate a reference number for a record. It works for a while but then starts incrementing by 20 instead of 1. I'm doing is using select reference.nextval from DUAL. Has anyone else had this problem and know how to fix it
VIEWS ON THIS POST

91

Posted on:

Wednesday 21st November 2012
View Replies!

build own login system

i write this code for login purposes..but its not working..so can anybody help me with this one..this is the code i write so far..please rewrite this code so it will work properly..thanks in advance -webber- Protected Sub Login_Click(ByVal sender As Object, ByVal e As System.EventArgs) Dim myconnection As MySqlConnectionmyconnection = New MySqlConnection("server=localhost; user id=******; password=*******; database=test; pooling=false;") myconnection.Open() Dim mycommand As New MySqlCommand mycommand.CommandText = "select from loginadmin where username like '%" & txtusername.Text & "%' and password like '%" & txtpassword.Text & "'" If txtusername.Text = True And txtpassword.Text = True Then Response.Redirect("MySQL2.aspx") Else Response.Redirect("Default.aspx") End If End Sub
VIEWS ON THIS POST

88

Posted on:

Wednesday 21st November 2012
View Replies!

automatic XML generation

does Oracle OLEDB support automatic XML generation
VIEWS ON THIS POST

108

Posted on:

Wednesday 21st November 2012
View Replies!

oracle LOB, encoding issue - see second post

Hi ! I don't get how I am supposed to get my data back from my database CLOB fields. My CLOB length is a long integer (long or int64), but the Read method parameters are all integers (int or int32), including the offset !How is it possible to read the whole CLOB if its length exceed the Int32.MaxValue I am missing something Should I just use "return (string)clob.Value;" That works, but what about encoding Here is the code I tried to use (C#).
VIEWS ON THIS POST

322

Posted on:

Wednesday 21st November 2012
View Replies!

displaying a mysql table in formview

, I have recently migrated all of my databases from ms sql server express 2005, to MySQL, as most web host do not provide the vast quantity of ms sql server space that i am going to need for my website. So far, everything is going fine. I migrated the databases, and i even got MySQL to work with visual web developer express 2005. However, i am currently facing some difficulties in displaying and entering some data into the MySQL database. Now, what im trying to do is that, when the user opens the sharedownloads.aspx page, the database verifies the user's username, and displays the files that corresponds to the user's username, in the formview control \t\t\t \t\t\t\t\t \t\t\t \t And this is the c# code protected void Page_Load(object sender, EventArgs e) \t { \t\t\t \t\t\t if ( !Page.IsPostBack) \t\t\t { \t\t\t\t\t SqlDataSource2.SelectParameters["UserName"].DefaultValue = User.Identity.Name; \t\t\t\t\t showDbImage(); \t\t\t } \t } Now, when i run the page, nothing is displayed in the formview, and i have no idea why. I am sure that the code works, because, at the end of the sql statement, when i remove ' WHERE (UserName = @Username), then all the files are shown in the formview.
VIEWS ON THIS POST

222

Posted on:

Wednesday 21st November 2012
View Replies!

Migrate php to ASP change DB

I am using php ad MySQL . I am going to mgrate to ASP.NET.I ned to migrate from MYSQL to SQL2005. What is the solution to change my DB while My DB records will Correctly Exported to SQL2005.
VIEWS ON THIS POST

60

Posted on:

Wednesday 21st November 2012
View Replies!

MySql Connector .NET and the DbProviderFactory

... I have downloaded the MySql Connector .NET form www.mysql.com . My connectionstring uses the MySql.Data.MySqlClient provider. When i use the DbProviderFactiry to create connections, readers and so on, it comes up with and error, saying that the provider has not been installed proberly... What is the proper way If i don't use the DbProviderFactiry, and use the MySql Connector .NET like this: \t\t\t\t\t MySqlDataReader reader = null; \t\t\t\t\t try \t\t\t\t\t { \t\t\t\t\t\t\t string strConn = ConfigurationManager.ConnectionStrings[connectionStringName].ConnectionString; \t\t\t\t\t\t\t string strProvider = ConfigurationManager.ConnectionStrings[connectionStringName].ProviderName; \t\t\t\t\t\t\t MySqlConnection myConn = new MySqlConnection(strConn); \t\t\t\t\t\t\t MySqlCommand cmd = new MySqlCommand(selectStatement, myConn); \t\t\t\t\t\t\t myConn.Open(); \t\t\t\t\t\t\t reader = cmd.ExecuteReader(CommandBehavior.CloseConnection); \t\t\t\t\t } \t\t\t\t\t catch (Exception Ex) \t\t\t\t\t { \t\t\t\t\t\t\t throw new Exception(Ex.Message, Ex); \t\t\t\t\t } \t\t\t\t\t return reader; I get the following error: Type 'MySql.Data.Types.MySqlConversionException' in assembly 'MySql.Data, Version=1.0.7.30072, Culture=neutral, PublicKeyToken=c5687fc88969c44d' is not marked as serializable. What could be the issue here , I use something like this in my webconfig : \t \t \t\t \t ---> and place the MySQL driver in the .bin directory. I get no exception errors. Hope that helps, if it does maybe, you can help me as I progess through my understanding of .NET 2.0. I have aprobI'm still stuck on see: "Gridview MySQL and Parameters" @ http://forums.asp.net/1214631/ShowPost.aspx ,with no replies.
VIEWS ON THIS POST

87

Posted on:

Wednesday 21st November 2012
View Replies!

Free MySql 5 and Website

I'm building my web site and it should work with DATABASE ( intensive ). currently i'm working with MySql 5 (InnoDB) just because it's free.( im new to mysql ) but i don't know how this are gonna work when i will publish my website,i mean that i don't really know how MySql gonna deal with a lot of users which do some action like SELECT UPDATE And INSERT. My concern is about CONCURRENT issue,and if MySql can handle all this. Please help me understand if 'MySql' can be a right choice for this task.
VIEWS ON THIS POST

68

Posted on:

Wednesday 21st November 2012
View Replies!

Firebird and commit

I have connected to Firebird over ODBC and have on WebForm GridView1 and SqlDataSource1 and enabled editing and delete-ing. also, I filled the UPDATE, INSERT and DELETE SQL statements. Problem is that data is not COMMITed to database. after clicing update etc. where or how to call SQL COMMIT command in ASP.NET2.0
VIEWS ON THIS POST

187

Posted on:

Wednesday 21st November 2012
View Replies!

Data Connections with Oracle 10g

I'm not sure if anyone has run into this problem, but we have an application that was running with Oracle 9i and everything worked fine. We've upgraded to Oracle 10g, and we are having rouble establishing a connection to this. If anyone has any info, it would be appreciated.
VIEWS ON THIS POST

83

Posted on:

Wednesday 21st November 2012
View Replies!

longtext problem (asp vs mysql)

dear all: I got a problem.I have 2 computer, them bothhad install "visual web developer 2005 express edittion2" And something strange happen. The computer had win2k system counldn't get longtext field from the mysql when I running aspx-fileright the IE borwser. But the other one had win xp system could got it back ,and working well. It's bug me,and make me confuse . How should I fix this problem help me please ! And thanks a lot. There're error message below: [OdbcException (0x80131937)] System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) +35 \t System.Data.Odbc.OdbcDataReader.GetData(Int32 i, SQL_C sqlctype, Int32 cb, Int32& cbActualOut) +164 \t System.Data.Odbc.OdbcDataReader.internalGetString(Int32 i) +88 \t System.Data.Odbc.OdbcDataReader.GetValue(Int32 i, TypeMap typemap) +69 \t System.Data.Odbc.OdbcDataReader.internalGetValue(Int32 i) +137 \t System.Data.Odbc.OdbcDataReader.GetValues() +28 \t System.Data.Odbc.OdbcDataReader.Read() +284 ..... .... and so on....
VIEWS ON THIS POST

280

Posted on:

Wednesday 21st November 2012
View Replies!

Can not insert data in MySql DataBase

I connect MySql database with MySql Connector Net 1.0.4 , I could connect MySql Database and can get data from the database But I can't insert data into MySql Database How to use Parameter in MySqlCommand please help me !!!
VIEWS ON THIS POST

150

Posted on:

Wednesday 21st November 2012
View Replies!

compare blobs in informix database

Hi I have a table in informix database in which a field is there i.e note of text type. when i campare it in the select statement. odbc gives an error i.e "Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Informix][Informix ODBC Driver][Informix]Blobs are not allowed in this expression" Pleasehelp me. Priya
VIEWS ON THIS POST

285

Posted on:

Wednesday 21st November 2012
View Replies!

Oracle Error ORA-01461: can bind a LONG value only for insert into a LONG column

Hi My C# code: try \t\t{ \t\ttestConn.Open(); \t\t \t\tOracleCommand cmd1 = new OracleCommand("insert into clobtest(:clob,id) values(:clob,'5')",testConn); \t\tOracleParameter op = cmd1.Parameters.Add("clob",OracleType.Clob); \t\top.Value = clob;// clob is more than 4000 characters text. \t\tcmd1.ExecuteNonQuery(); \t\t} \t\tcatch(Exception ex) \t\t{ \t\tMessageBox.Show(ex.ToString()); \t\t} Oracle Error ORA-01461: can bind a LONG value only for insert into a LONG column
VIEWS ON THIS POST

192

Posted on:

Wednesday 21st November 2012
View Replies!

mySQL connection string

, I need to connect to a mySQL database from my ASP .NET project. I have two questions first though that I need to know: #1. Can I just use ODBC objects to access the mySQL database #2. What should my connection string look like for the database
VIEWS ON THIS POST

157

Posted on:

Wednesday 21st November 2012
View Replies!

ODP.NET : VB.NET and PLSQLAssociativeArray, hanging webserver

, I'm trying to use a PLSQLAssociateiveArray as output parameter using the examples from the ODP.NET client distribution, but when i call ExecuteNonQuery(), the webserver hangs.
VIEWS ON THIS POST

217

Posted on:

Wednesday 21st November 2012
View Replies!

Oracle Helper class

Hi all, I remember someone creating an oracle helper class something like the SQL helper class a while back but I can't remember where I saw this or even who did it. If you remember this and know where it can be found, I would appreciate a link.
VIEWS ON THIS POST

249

Posted on:

Wednesday 21st November 2012
View Replies!

1 Dimensional Array

I have tried to create an add entry form for a page made with ASP.net (VB) and MYSQL. I have managed to get something working with edit / delete, but when I try and add an entry with this page I get the following error. CompilerErrorMessage:BC30311:Valueoftype'System.Data.Odbc.OdbcCommand'cannotbeconvertedto'1-dimensionalarrayofSystem.Data.Odbc.OdbcCommand'. SourceError: Line12: strInsert="InsertIntoservers_test(client_name,gateway,connection_type,hostname,server,login,password,connection_bis,market,software,node,description,comments,enable)"&_ Line13: "Values(@ClientName,@Gateway,@ConnectionType,@Hostname,@Server,@Login,@Password,@ConnectionBis,@Market,@Software,@Node,@Description,@Comments,@Enable)" Line14: cmdInsert=NewODBCCommand(strInsert,MyConn) Line15:\t\tcmdInsert.Parameters.Add("@ClientName",txtClientname.Text) Line16: cmdInsert.Parameters.Add("@Gateway",txtGateway.Text) Any idea's Here is the complete code: Sub Button_Click (obj As Object, e As EventArgs) Dim connectionString As String = "Driver={MySQL ODBC 3.51 Driver};SERVER=*;UID=*;PWD=*;DATABASE=*;" Dim MyConn As New OdbcConnection(connectionString) Dim strInsert As String Dim cmdInsert As OdbcCommand() strInsert = "Insert servers_test ( client_name, gateway, connection_type, hostname, server, login, password, connection_bis, market, software, node, description, comments, enable ) " & _ "Values ( @ClientName, @Gateway, @ConnectionType, @Hostname, @Server, @Login, @Password, @ConnectionBis, @Market, @Software, @Node, @Description, @Comments, @Enable )" cmdInsert = New ODBCCommand( strInsert, MyConn ) cmdInsert.Parameters.Add( "@ClientName", txtClientname.Text ) cmdInsert.Parameters.Add( "@Gateway", txtGateway.Text ) cmdInsert.Parameters.Add( "@ConnectionType", txtConnectionType.Text) cmdInsert.Parameters.Add( "@Hostname", txtHostname.Text ) cmdInsert.Parameters.Add( "@Server", txtServer.Text ) cmdInsert.Parameters.Add( "@Login", txtLogin.Text ) cmdInsert.Parameters.Add( "@Password", txtPassword.Text ) cmdInsert.Parameters.Add( "@ConnectionBis", txtConnectionbis.Text ) cmdInsert.Parameters.Add( "@Market", txtMarket.Text ) cmdInsert.Parameters.Add( "@Software", txtSoftware.Text ) cmdInsert.Parameters.Add( "@Node", txtNode.Text ) cmdInsert.Parameters.Add( "@Description", txtDescription.Text ) cmdInsert.Parameters.Add( "@Comments", txtComments.Text ) cmdInsert.Parameters.Add( "@Enable", txtEnable.Text ) MyConn.Open() cmdInsert.ExecuteNonQuery() MyConn.Close() End Sub Client Name Gateway Connection Type Hostname Server Login Password Connection Bis Market Software Node Environment Mode Description Comments Enable
VIEWS ON THIS POST

199

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!

Oracle 10g with MS ODP

Just wondering if anyone has tried using Oracle 10g with MS ODP. Is it compatible \t
VIEWS ON THIS POST

166

Posted on:

Wednesday 21st November 2012
View Replies!

text datatype

hi, i can't seems to update the below sql statement because the field 'notes' is a text type. how can i change the sql so that it can be able to update\t thanks UPDATE z_test set notes='' where code ='test' ************************************************************************* Server: Msg 7306, Level 16, State 2, Line 1 Could not open table '"z_test"' from OLE DB provider 'SQLOLEDB'. The provider could not support a row lookup position. The provider indicates that conflicts occurred with other properties or requirements. [OLE/DB provider returned message: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.]
VIEWS ON THIS POST

248

Posted on:

Wednesday 21st November 2012
View Replies!

importing libraries (a newbie question)

I'm really going to sound like an idiot asking this, but please bear with my incompetence. I'm just really new to asp.net. I'm trying to connect to a Mysql database using ASP .net. This is my code: Sub Button1_Click(sender As Object, e As EventArgs) 'Connector/ODBC 3.51 connection string try Dim MyConString As String = "DRIVER={MySQL ODBC 3.51 Driver};" & _ "SERVER=localhost;" & _ "DATABASE=newdatabase;" & _ "UID=root;" & _ "OPTION=3;" Dim MyConnection As New OdbcConnection(MyConString) MyConnection.Open() Console.WriteLine ("Connection State::" & MyConnection.State.ToString) Dim MyCommand As New OdbcCommand() MyCommand.Connection = MyConnection MyCommand.CommandText = "SELECT UserName from usertable where UserName=" & UserNameBox.text & " PassWord=" & PassWordBox.text Console.WriteLine (MyCommand.CommandText) Dim MyDataReader As OdbcDataReader MyDataReader = MyCommand.ExecuteReader if myReader.Read() WelcomeLabel.Text = "Welcome: " + UserName.text WelcomeLabel.Visible = true else WelcomeLabel.Visible = false End if ' always call Close when done reading. myReader.Close() ' Close the connection when done with it. myConnection.Close() Catch MyOdbcException As OdbcException Dim i As Integer Console.WriteLine (MyOdbcException.ToString) 'Catch program exception Catch MyException As Exception Console.WriteLine (MyException.ToString) End Try End Sub ..... I don't know why ASP .net doesn't recognize ODBC classes, it keeps giving the error Type 'OdbcConnection' is not defined I guess I didn't add the ODBC library properly, but I don't know how though. (btw, I do have the drivers all setup). Please help,
VIEWS ON THIS POST

263

Posted on:

Wednesday 21st November 2012
View Replies!

Inserting NULLS into MySQL database.

Hi all, I'm completely new to this so please excuse if my code is all over the place - I've tried to copy and modify as much as possible. I am trying to create a website that will display the data from one database (mysql) and then return some of the data and some more user input to a second database (also mysql) the reason for using two databases is unimportant. The code below works fine in terms of connections, but falls over in that it inserts new records where all field are NULL (not the input that I wanted them to be). Any help would be greatly appreciated.
VIEWS ON THIS POST

90

Posted on:

Wednesday 21st November 2012
View Replies!

Where is "System.Data.OracleClient"?

I have .NET Framework 1.1.4322 installed on my system. Says that "System.Data.OracleClient" and "System.Data.Odbc" are part of .NET 1.1 version. But I couldn't find them. Something wrong with my configuration Or should I download the namespaces separately Where Please info.
VIEWS ON THIS POST

99

Posted on:

Wednesday 21st November 2012
View Replies!

Generate CASE WHEN Query with ORDER BY involving Secondary Sort

Below Query I understand is improper wrt syntax. Need to modify query to fetch correct result for me. Please help! select * from tableA order by case when a is not null then a DESC else b DESC, c DESC END Note: DESC or ASC is dynamic coming from java-code.
VIEWS ON THIS POST

88

Posted on:

Friday 28th December 2012
View Replies!

Trigger help - IF UPDATING THEN

I've created a trigger named customer_archive_tr on the customer table. The trigger saves the current values of all columns of the customer table to the customer_history table before the record is updated or deleted. (Here is where I get confused...) If the customer table is being updated, my trigger should also populate 'customer.last_update_date' using SYSDATE and 'customer.last_updated_by' with USER.
VIEWS ON THIS POST

156

Posted on:

Friday 28th December 2012
View Replies!

Newbie SQL Query: Asking to fetch multiple entries in same table

Good Morning, I'm new to SQL and although I'm getting better, I've got a query at the moment that is totally blinding me! It's probably really simple, and I was wondering if you could provide some help. Basically, an application we use in my business records some information regarding a "Future Review Date" which would tell us when to contact the customer again. I've written code that brings back all upcoming future review dates: select xxxfolder.folderref, xxxperson.surname,xxxperson.forenames,xxxperson.nino, xxxperson.dob, fr.reviewdate, f.dateleft from xxxfolder, xxxperson, xxxdeferment d, xxxfolderfuturereview fr,xxxfolderschemehist f where xxxFOLDER.PERSONID = xxxPERSON.PERSONID and xxxfolder.folderid = d.folderid and xxxfolder.folderid = fr.folderid and f.folderid=xxxfolder.folderid and xxxfolder.folderstatusfg = 'D' This brings up all the base data needed, I'm just having trouble adding one more line to the code that will only bring back records where there is more than one entry per customer on the review date screen. A little help AE
VIEWS ON THIS POST

83

Posted on:

Friday 28th December 2012
View Replies!

How to check for VSS support of a oracle instance

From the VSS backup & restore document, it is said that currently Oracle VSS writer service does not support VSS for oracle database configure with ASM, RAW file system, OCFC, ACFS, NFS. Also it does not support RAC with the above config. Is there any way to know from the Oracle instance that VSS is not support if such configuration are set. I mean is there any direct way for e.g. OCI api or sql query which tells whether vss is supported for that particular instance If not than is there some workaround. May be we can get info about such configuration (eg ASM, RAW file system etc). TIA
VIEWS ON THIS POST

196

Posted on:

Monday 31st December 2012
View Replies!

Executing a Function in Oracle

I have created a Package Body and Package Spec for a function to select a username and a password from a table and return the username. The code i have created is this:- CREATE OR REPLACE PACKAGE BODY USER_LOGIN AS FUNCTION user_select (USERNAME_IN VARCHAR2, PASSWORD_IN VARCHAR2) RETURN VARCHAR2 IS USERNAME_OUT VARCHAR2(12); BEGIN SELECT USERNAME INTO USERNAME_OUT FROM USERS WHERE USERNAME = USERNAME_IN AND PASSWORD = PASSWORD_IN; RETURN USERNAME_OUT; END user_select; END USER_LOGIN; / The package body and spec compiles successfully but i am having trouble when i execute this function. I am trying to do this :- VARIABLE RETVAL VARCHAR2(12) EXEC User_login.user_select('HELLO','HELLO',:RETVAL ); but i am getting the following error ERROR at line 1: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'USER_SELECT' ORA-06550: line 1, column 7: PL/SQL: Statement ignored Can anyone please help me
VIEWS ON THIS POST

345

Posted on:

Monday 31st December 2012
View Replies!