Help creating stored procedures dynamically!


Does anybody know how to achieve this I tried using both Oracle and MS ODP.NET even tried OleDB and none of them seemed to work, if i do use sql*plus to compile the procedure it works fine, using the code below doesnt seem to work!! Even tried to catch up some exception but there were none. Once i run it and try to execute the SP i get an invalida object error in sql pluss. please help Dim strSql As String strSql = "CREATE OR REPLACE PACKAGE OPSPRUEBAS AS " & vbCrLf strSql = strSql & vbTab & "PROCEDURE consulta (resultado OUT VARCHAR2); " & vbCrLf strSql = strSql & "END OPSPRUEBAS; " & vbCrLf strSql = strSql & "/ " & vbCrLf strSql = strSql & ". " & vbCrLf strSql = strSql & "CREATE OR REPLACE PACKAGE BODY OPSPRUEBAS AS " & vbCrLf strSql = strSql & "PROCEDURE consulta (resultado OUT VARCHAR2) IS " & vbCrLf strSql = strSql & "oc_ref" & vbTab & vbTab & "REF Content_Ontology; " & vbCrLf strSql = strSql & "oc" & vbTab & vbTab & "Content_Ontology; " & vbCrLf strSql = strSql & "ori" & vbTab & vbTab & "role_def; " & vbCrLf strSql = strSql & "ori_ref" & vbTab & vbTab & "ref role_def; " & vbCrLf strSql = strSql & "conce" & vbTab & vbTab & "concept; " & vbCrLf strSql = strSql & "conce_ref" & vbTab & "REF concept; " & vbCrLf strSql = strSql & "b" & vbTab & vbTab & "boolean; " & vbCrLf strSql = strSql & "BEGIN " & vbCrLf strSql = strSql & "b:=false; " & vbCrLf strSql = strSql & "select REF(oi) into ori_ref from rol_table oi where oi.name='Playing'; " & vbCrLf strSql = strSql & "select deref(ori_ref) into ori from dual; " & vbCrLf strSql = strSql & "select REF(oi) into oc_ref from c_ontologies oi where oi.web_source_prop=websource('FilmContentOntology'); " & vbCrLf strSql = strSql & "select deref(oc_ref) into oc from dual; " & vbCrLf strSql = strSql & "if oc.if_has_co_class('Film')='TRUE' AND " & vbCrLf strSql = strSql & "oc.if_has_co_class('theater')='TRUE' AND " & vbCrLf strSql = strSql & "oc.if_has_co_relationship('is_scheduled')='TRUE' AND " & vbCrLf strSql = strSql & "oc.if_has_co_attributes('Film', lista('is_scheduled', 'title', 'actor'))='TRUE' AND " & vbCrLf strSql = strSql & "oc.if_has_co_attributes('theater', lista('theatername', 'address', 'email'))='TRUE' " & vbCrLf strSql = strSql & "then resultado:='FilmContentOntology'; " & vbCrLf strSql = strSql & "else resultado:='No Existe'; " & vbCrLf strSql = strSql & "end if; " & vbCrLf strSql = strSql & "END consulta; " & vbCrLf strSql = strSql & "END OPSPRUEBAS; " & vbCrLf strSql = strSql & "/ " & vbCrLf strSql = strSql & ". " & vbCrLf strSql = strSql & "COMMIT;" & vbCrLf TextBox2.Text = strSql 'Dim myConnectionString As String = "User Id=system;Password=daniel;Data Source=websogo;" 'Dim oraConn As Oracle.DataAccess.Client.OracleConnection = New Oracle.DataAccess.Client.OracleConnection(myConnectionString) Dim myCmd As New System.Data.OleDb.OleDbCommand() Dim MyConnection As New System.Data.OleDb.OleDbConnection() MyConnection.ConnectionString = "Provider=MSDAORA;Data Source=websogo;password=daniel;User ID=system" MyConnection.Open() 'oraConn.Open() myCmd.Connection = MyConnection myCmd.CommandType = CommandType.Text myCmd.CommandText = strSql myCmd.ExecuteNonQuery() 'Dim e As Oracle.DataAccess.Client.OracleException 'Try ' myCmd.ExecuteNonQuery() 'Catch e ' Dim error1 As Oracle.DataAccess.Client.OracleError ' error1 = e.Errors.Item(0) ' Textbox3.Text = error1.Source & " " & error1.Message 'End Try MyConnection.Close() End Sub
Posted On: Wednesday 21st of November 2012 02:53:08 AM Total Views:  304
View Complete with Replies

RELATED TOPICS OF Oracle PROGRAMMING LANGUAGE




Please help...Error:Oracle not available!!!

Hi all, I am trying to install oracle 8.1.7 Enterprise edition on windows 2000 professinal edition I have installed oracle, I am able to log in with user name:sys and password:change_on_install, but when i try to configure the management server. I was able to create the repository. Whenever I try to start the management server manually from the services, it gives me error like: ERROR: Management server is not working in timely fashion. I have changed HKEY_LocalMachine\Software\Oracle\_Homes\ID0\NLS_LANG key of registry to AMERICAN_AMERICA.WE8ISO8859P1. After this when I logout of sqlplus and try to enter again I gets the error while logging in: ERROR: ORA-01034: ORACLE not available. ORA-27101: shared memory realm does not exist I have deinstallad and instaled the ORACLE again but still no success. I am getting the same error while logging in sqlplus. Please if somebody can help..
VIEWS ON THIS POST

151

Posted on:

Friday 16th November 2012
View Replies!

Please help! Urgent

Hi all! I got these four tables: (staff, courses, students, enroll) STAFF: STAFFID STAFFNAME DEPT POSITION ------- ------------------------- --------------- -------------------- t101 Adams Art Professor t202 Smith History Lecturer t105 Tanaka CSE Tutor t110 Byrne Maths Lecturer t221 Smith CSE Professor COURSES: COURSENO STAFFID SCHED ROOM ------- ------- --------- ---- art103a t101 mwf9 h221 cse201a t105 tuthf10 m110 mth101b t110 mtuth9 h225 hst205a t202 mwf11 h221 mth103c t110 mwf11 h225 cse203a t105 mthf12 m110 Students: STUID STUNAME MAJOR CREDITS ----- ------------------------------ --------------- ---------- s1001 Smith, Tom History 90 s1010 Burns, Edward Art 63 s1015 Jones, Mary Maths 42 s1002 Chin, Ann Maths 36 s1020 Rivera, Jane CSC 15 s1013 McCarthy, Owen Maths 9 Enroll: COURSENO STUID GRADE ------- ----- ----- art103a s1001 A cse201a s1020 b cse201a s1002 f art103a s1010 art103a s1002 d mth101b s1020 a hst205a s1001 c mth103c s1010 mth103c s1002 b Q1. can anyone tell me how I could show the count for ALL staff(including the ones who have zero room count) I did this but can't show zero: SELECT STAFF.STAFFID, STAFF.POSITION, STAFF.STAFFNAME, COUNT(DISTINCT COURSES.ROOM) AS RM_COUNT FROM STAFF, COURSES WHERE STAFF.STAFFID=COURSES.STAFFID GROUP BY STAFF.STAFFID; Q2. can anyone tell me how to write the query the find the total number of students who either take at most one course (over the course of the week) or do not attend a class on tuesday
VIEWS ON THIS POST

289

Posted on:

Friday 16th November 2012
View Replies!

Please help me

My platform is Oracle 10g under Windows 2003 . My database is in NOARCHIVELOG.Its complete dump file sizes 646MB,very important database and can't miss any data.Everyday It is exported in a schedule per day.I found the control files and online redo log files are multiplexed to the same drive. I am new here. I think if any failure occurs now, I can't bring it back to point-in-time recovery. Could you tell me your suggestions in a simple way and how to implement it and the backup procedures I should follow A learning DBA.
VIEWS ON THIS POST

167

Posted on:

Friday 16th November 2012
View Replies!

Need help with uploading a text file in to mysql database

I want to upload a text file and stored to my database. the column on mydatabaseit is longblob type. I don't know much about this so if anyone can help I will
VIEWS ON THIS POST

452

Posted on:

Tuesday 20th November 2012
View Replies!

keeping track of number of votes: help

hello, I have a database of user uploaded music. I have created a system that pins two of the uploaded songs against one another at random. The user can then vote for which song they like better. I need to be able to keep track of the overall wins for a selected song. my DB table holds (id, filename, track, artist, album, genre, username, artistpage, fullpath) for uploads. I figure I can just create another field called like "wins" and everytime they click vote, it does an update on that row where filename=filename and adds an int +1 to the field "wins". How would i go about pulling the value of wins for a selected filename, and then adding +1 to it. I assume also i will have to re-insert all the field valuesfor that row after, along with the update win value, correct
VIEWS ON THIS POST

192

Posted on:

Tuesday 20th November 2012
View Replies!

helping with converting result to a string

hello, I want to count the number of records in a table and display the number on my page, however i have only even used the SQL so far to setup datatables to be used in gridviews, how can i just get the result and set it to a string to be displayed in a label for example. thanks here is the code i use for agridview Dim strQuery1 As String Dim cmd1 As MySqlCommand strQuery1 = "select count (*) from uploads" cmd1 = New MySqlCommand(strQuery1)Dim dt1 As DataTable = GetData(cmd1) GridView4.DataSource = dt1 GridView4.DataBind()
VIEWS ON THIS POST

180

Posted on:

Tuesday 20th November 2012
View Replies!

Need help with this stored Procedure+sql

Mate, \t\t\t\t\t\t Please tell me what i have done wrong in the below stored procedure. the procudure got created but at runtime it throws me an error 'Invalid Object Name 'TEMP''. i actually tried to decaled this as a temporary table like #TEMP. but its not solving my problem. So i Request u to help me ! CREATE PROC [dbo].[GLAS_PROC_LISTING_PAGE]\t\t\t\t\t\t\t\t\t\t\t @TABLENAME VARCHAR(50),\t\t\t\t\t @TABLE_CODE VARCHAR(50),\t\t\t\t\t @IS_FILTER VARCHAR(1),\t\t\t\t\t @SEARCH VARCHAR(500),\t\t\t\t\t @STR VARCHAR(1)\t\t\t\t\t\t\t\t\t\t\t\t\t\t AS\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t BEGIN\t\t\t\t\t\t\t IF @STR='1'\t\t\t\t\t /* COMMON_RET_TABLE_NAMES */\t\t\t\t\t \t\t\t\t\t SELECT CODE,NAME,PAGENAME,TBLHEAD FROM COMMON_TABLENAMES\t\t\t\t\t\t\t\t\t\t\t\t\t WHERE CODE=@TABLE_CODE\t\t\t\t\t \t\t\t\t\t \t\t\t\t\t IF @STR='2'\t\t\t\t\t /* COMMON_CUR */\t\t\t\t\t \t\t\t\t\t DECLARE @COLNAME VARCHAR(30)\t\t\t\t\t\t\t\t\t\t\t\t\t DECLARE @IS_ACTIVE VARCHAR(1)\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 DECLARE MYCURSOR CURSOR FOR SELECT COLUMNNAME FROM COMMON_FIELDNAMES\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\t WHERE TBL_CODE=@TABLENAME AND COLUMNRANK IS NOT NULL AND COLUMNDESCR IS NOT NULL\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ORDER BY COLUMNRANK\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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t DECLARE @STRCOLNAME VARCHAR(500)\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\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 SET @STRCOLNAME = ''\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\t\t\t\t\t\t SET @IS_ACTIVE = 'N'\t\t\t\t\t\t\t\t\t\t OPEN MYCURSOR\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\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 FETCH NEXT FROM MYCURSOR\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\t INTO @COLNAME\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\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 WHILE @@FETCH_STATUS = 0\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\t BEGIN\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\t SET @STRCOLNAME = @STRCOLNAME + ',' + @COLNAME\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 FETCH NEXT FROM MYCURSOR\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\t INTO @COLNAME\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 END\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\t\t CLOSE MYCURSOR\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 --SELECT LEN(@STRCOLNAME) - 1\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 SET @STRCOLNAME = SUBSTRING(@STRCOLNAME, 2, LEN(@STRCOLNAME))\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t BEGIN\t DECLARE @TEMP TABLE (COLUMNNAME VARCHAR(500)) INSERT INTO TEMP VALUES(@STRCOLNAME)\t\t\t\t\t\t\t\t\t\t EXEC('SELECT ' + @STRCOLNAME + ' FROM ' + @TABLENAME )\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\t END\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\t\t DEALLOCATE MYCURSOR\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\t --@STRCOLNAME\t\t\t\t\t\t\t \t\t\t\t\t \t\t\t\t\t IF @STR='3'\t\t\t\t\t /* COMMON_GETCOLWIDTH */\t\t\t\t\t \t\t\t\t\t \t\t\t\t\t SELECT COLUMNDESCR, COLUMNWIDTH FROM COMMON_FIELDNAMES WHERE TBL_CODE = @TABLE_CODE\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 IF @STR='4'\t\t\t\t\t /* COMMON_SAMPLE_EX */\t\t\t\t\t \t\t\t\t\t SELECT COLUMNDESCR,COLUMNNAME FROM COMMON_FIELDNAMES\t\t\t\t\t\t\t\t\t WHERE TBL_CODE=@TABLE_CODE AND IS_FILTER= @IS_FILTER ORDER BY COLUMNRANK\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t \t\t\t\t\t IF @STR='5'\t\t\t\t\t /* COMMON_RET_COLUMN_NAMES */\t\t\t\t\t \t\t\t\t\t SELECT * FROM COMMON_FIELDNAMES WHERE TBL_CODE = @TABLENAME AND COLUMNDESCR IS NOT NULL AND COLUMNRANK IS NOT NULL\t\t\t\t\t\t\t\t \t\t\t\t\t \t\t\t\t\t IF @STR='6'\t\t\t\t\t /* COMMON_RET_SEARCH */\t\t\t\t\t \t\t\t\t\t DECLARE @COLNAME1 VARCHAR(30)\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 DECLARE MYCURSOR1 CURSOR FOR SELECT COLUMNNAME FROM COMMON_FIELDNAMES\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 WHERE TBL_CODE=@TABLE_CODE AND COLUMNRANK IS NOT NULL AND COLUMNDESCR IS NOT NULL\t\t\t\t ORDER BY COLUMNRANK\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\t\t\t\t\t\t\t\t\t\t\t\t\t\t DECLARE @STRCOLNAME1 VARCHAR(500)\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\t\t\t\t\t\t\t\t\t\t\t SET @STRCOLNAME1 = ''\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\t\t\t\t\t\t\t\t\t\t\t\t OPEN MYCURSOR1\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\t\t\t\t\t\t\t\t\t\t FETCH NEXT FROM MYCURSOR1\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 INTO @COLNAME1\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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t WHILE @@FETCH_STATUS = 0\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 BEGIN\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 SET @STRCOLNAME1 = @STRCOLNAME1 + ',' + @COLNAME1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t FETCH NEXT FROM MYCURSOR1\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 INTO @COLNAME1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t END\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 CLOSE MYCURSOR1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t --SELECT LEN(@STRCOLNAME) - 1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t SET @STRCOLNAME1 = SUBSTRING(@STRCOLNAME1, 2, LEN(@STRCOLNAME1))\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t BEGIN\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t --INSERT INTO TEMP VALUES(@STRCOLNAME)\t\t\t\t\t\t\t\t\t\t\t\t\t EXEC('SELECT ' + @STRCOLNAME1 + ' FROM ' + @TABLE_CODE + ' WHERE 1=1 ' + @SEARCH)\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 END\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 DEALLOCATE MYCURSOR1\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 --@STRCOLNAME\t\t\t\t\t\t\t\t \t\t\t\t\t END
VIEWS ON THIS POST

189

Posted on:

Tuesday 20th November 2012
View Replies!

How to pass parameter through oraclehelper class when 'in' operator is there.

I am using oraclehelper.cs class for connecting to database, my front end is asp.net 2.0. while i am passing a parameter to query it is giving "ORA-01008:not all variables bound" error, i am sending my query and parameter i am passing please tell me where is the problem. query: selectpersonid from dwperson where customerid in(:customer); parameter: OracleParameter parcustid = new OracleParameter("customer", OracleType.VarChar, 100); parcustid .Value = strcustomerid; and the strcustomerid value="123,245,456" can any body tell me what is the problem as soon as possible.
VIEWS ON THIS POST

307

Posted on:

Tuesday 20th November 2012
View Replies!

need help with ORA-01427: single-row subquery returns more than one row error

the following select in oracle 10g gives an error , need some help thanks select 'AGD' BusUnitCode, 'A' LedgerCode, 'ACTUALS' LedgerName, (select sign(count(OBJECT_NAME)) from ALL_OBJECTS where OBJECT_ID = (select OBJECT_ID from ALL_OBJECTS where OBJECT_NAME='SALHARCAGD' ) ) LedgerHasArchive, ' ' DataAccessGroup from ALL_OBJECTS where (select OBJECT_ID from ALL_OBJECTS where OBJECT_NAME='SALFLDGAGD'and DATA_OBJECT_ID is not null ) is not null union select 'AGD', substr(KEY_FIELDS,1,1), substr(SUN_DATA,1,15), 0, substr(SUN_DATA,242,5) from SSRFMSC where SUN_DB='AGD' and SUN_TB = 'BUD' and (select OBJECT_ID from ALL_OBJECTS where OBJECT_NAME='SA' || substr(KEY_FIELDS,1,1) || 'FLDGAGD' and DATA_OBJECT_ID is not null ) is not null union select 'CXX' BusUnitCode, 'A' LedgerCode, 'ACTUALS' LedgerName, (select sign(count(OBJECT_NAME)) from ALL_OBJECTS where OBJECT_ID = (select OBJECT_ID from ALL_OBJECTS where OBJECT_NAME='SALHARCCXX' ) ) LedgerHasArchive, ' ' DataAccessGroup from ALL_OBJECTS where (select OBJECT_ID from ALL_OBJECTS where OBJECT_NAME='SALFLDGCXX' and DATA_OBJECT_ID is not null ) is not null union select 'CXX', substr(KEY_FIELDS,1,1), substr(SUN_DATA,1,15), 0, substr(SUN_DATA,242,5) from SSRFMSC where SUN_DB='CXX' and SUN_TB = 'BUD' and (select OBJECT_ID from ALL_OBJECTS where OBJECT_NAME='SA' || substr(KEY_FIELDS,1,1) || 'FLDGCXX' and DATA_OBJECT_ID is not null ) is not null union select 'DEM' BusUnitCode, 'A' LedgerCode, 'ACTUALS' LedgerName, (select sign(count(OBJECT_NAME)) from ALL_OBJECTS where OBJECT_ID = (select OBJECT_ID from ALL_OBJECTS where OBJECT_NAME='SALHARCDEM' ) ) LedgerHasArchive, ' ' DataAccessGroup from ALL_OBJECTS where (select OBJECT_ID from ALL_OBJECTS where OBJECT_NAME='SALFLDGDEM' and DATA_OBJECT_ID is not null ) is not null thanks robby
VIEWS ON THIS POST

406

Posted on:

Tuesday 20th November 2012
View Replies!

connection string help

Hi. I am trying to connect my ASP.net web app to my MySql server. I get an error ('Cannot start your application. The workgroup information file is missing or opened exclusively by another user." \t My connection string at the time of the error looks like this, I get my physical paths from Server.MapPath in my C# connection class. I am not sure if I am using workgroups, but when I created my MySql database I made an account with a password. Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\XXXXX\XXXXX\XXXXX\demo1.mdb;Password=xxxxxxxx;User ID=xxxxxx;Jet OLEDB:System database=\\XXXXX\XXXXX\XXXXX\XXXXX\XXXXX\System.mdw Any ideas on what might be wrong with my connection string. If that is what the problem is.
VIEWS ON THIS POST

241

Posted on:

Wednesday 21st November 2012
View Replies!

Complete Newbie - Please help!

After years of somehow managing to avoid the migration to .NET it has finally come and I am blown away by the differences between classic ASP and .NET. I'm hoping I can get some help with what should be (and probably is) a simple task: connecting to a MySQL server in my project. I am running VS 2008 and plan to develop in vb I am needing to connect to a MySQL 5.0 database. I have both my web project and database on my local computer during development. I have installed the MySQL connector 5.1.4 In Visual Studio 2008 I want to add a Data Connection - how the heck do I go about this\t I apologize in advance for such a basic question but everything I have read assumes things like the knowledge of what a "code behind" page is - as in "add this to your code behind page".... I'm looking (if possible) to add my data connection via the Server Explorer window in the IDE.
VIEWS ON THIS POST

350

Posted on:

Wednesday 21st November 2012
View Replies!

connector help - VS .NET 2k3

, I have run into a problem with using Visual Studio .NET 2003 and MySQL database. I am using MySQL 5.0, i downloaded the .NET Connector 5.0.8.1. When trying to reference the mysql.data.dll I get the "not a valid assembly or com component". This is because .net 2k3 only supports .NET 1.1 correct\t So is there anyway I can connect with mysql 5.0 with vs .net 2k3\t Without reverting back to older version of mysql\t
VIEWS ON THIS POST

188

Posted on:

Wednesday 21st November 2012
View Replies!

Please help! deadline looming close and I'm stuck.

This is kind of hard to explain but I'll do my best. I have a table in oracle that essentially has the same field 4 time named different names. It is connect to another table that defines those fields. Table AFIELD_ID NUMBER NOT NULL,NEW_VALUE VARCHAR2(100 BYTE),SUPPORT_FIELD1 NUMBER,SUPPORT_VALUE1 VARCHAR2(100 BYTE),SUPPORT_FIELD2 NUMBER,SUPPORT_VALUE2 VARCHAR2(100 BYTE),SUPPORT_FIELD3 NUMBER,SUPPORT_VALUE3 VARCHAR2(100 BYTE),APPROVED INTEGER,DECLINED INTEGER,PLATFORM_ID NUMBER\t Table B \t FIELD_ID\t\t\t\t\t\t NUMBER, DETAIL_DESC\t \t\t\tVARCHAR2(50 BYTE) In Table A, Field_ID, Support_Field1, Support_Field2, and Support_Field3 are all connected to Table B Field_ID. In my SQL query on my page I need to pull in the Field_ID from Table B for all 4 fields on Table A based on the Detail_Desc value on Table B pulled from the screen. The query I am using to pull in just one of the fields: sqlSelect = "SELECT FIELD_ID FROM TABLE_B ";sqlSelect = sqlSelect + "WHERE DETAIL_DESC = '" + lblField1.Text + "'";OracleDataAdapter daFields = new OracleDataAdapter(sqlSelect, con);OracleCommandBuilder cbFields = new OracleCommandBuilder(daFields);DataSet dsFields = new DataSet();daFields.Fill(dsFields, "CHFSSOMGR.MTG_FIELDS_TBL");DataTable dtFields = dsFields.Tables["CHFSSOMGR.MTG_FIELDS_TBL"];DataRow drFields = dtFields.Rows[0];string strField1 = drFields["FIELD_ID"].ToString();sqlInsert = "INSERT INTO TABLE_A(FIELD_ID, NEW_VALUE)";sqlInsert = sqlInsert + "VALUES (" + strField1 + ", " + txtField1.Text + ")";\tI assume there is probably a better way to do this but time does not allow me to explore that. But can what I want to do even be done Please help!\t\t
VIEWS ON THIS POST

260

Posted on:

Wednesday 21st November 2012
View Replies!

I need help for mysql database connection

Am implementing asp.net in my project and am new to this. now am using mysql database for my project i dont know how to connect this mysql database through coding...... This is connection string am using for my project ConnectionString = "driver={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=senthil;USER=root;Option=3;" \t\t\t \t\t\t Conn = New OdbcConnection(ConnectionString) When using this connectionstring am get this following error: " ERROR[IM002][Microsoft][ODBC Driver Manager]Data source name not found and no default driver specified " i dont know what to do\t please help me this is very helpful for my project...
VIEWS ON THIS POST

265

Posted on:

Wednesday 21st November 2012
View Replies!

Connect to MySQL server 4.1, please help

Hi I have a mysql database, I am using connection string below to connect to localhost: private const string m_ConnectionString = "Driver={MySQL ODBC 3.51 Driver};" + "Server=localhost;Database=mydb;uid=root;pwd=mypw;option=3"; It works fine. But when I change the connection string as: private const string my_ConnectionString = "DSN=MyDataSourceName"; It doesn't get any data. I have configured DSN as: Data Source Name=MyDataSourceName, server=localhost, user=root, password=mypw, Database=mydb, in Control Panel/Administrative Tool/Data Sources (ODBC). What else should I check with
VIEWS ON THIS POST

178

Posted on:

Wednesday 21st November 2012
View Replies!

plz urgent help

i want to deplay time from table in my sql but when i do that there is an error the table shows but the time doesnt plz help me when i see the table recoreds i want code to see the time that i stored in mysql table
VIEWS ON THIS POST

291

Posted on:

Wednesday 21st November 2012
View Replies!

ODP.NET:Windows Authentication is not working. Pls help.

I am working on VS.NET 2003 envt on a web application in C#.NET and trying to connect to Oracle 9i database. Because this appln is to be used in an intranet, hence OS authentication is to be used. The following connection string works fine for me and connects properly to the database; OracleConnection con = new OracleConnection(); con.ConnectionString = "User Id=temp_userID;Password=temp_pwd;Data Source = oracle_serverName;"; con.Open(); where 'user id' and 'password' are present in the 'sys_userinfo' table. Now when I connect to the oracle server thru SQL* PLUS, giving just "/" as the user-id (to indicate Windows authentication is to be considered) and appropriate server name, it properly connects to the database. Finally now I need to connect to the oracle server in following manner: OracleConnection con = new OracleConnection(); con.ConnectionString = "User Id=/;Data Source=oracle;"; con.Open(); Here it gives error saying "null password given, logon denied". I searched all over on Google here and there, tried all 3 data providers (ODP.NET, OleDb and ODBC), all the data providers connect to the database when the user-id and pwd is given, but none of them work for "user id=/", that is for OS authentication. I verified IIS config as well and it does has 'Integrated Windows Authentication' check box properly checked too. Nothing fancy, its simple attempt to connect to Oracle database thru Windows authentication, pls help! pls help!pls help!
VIEWS ON THIS POST

345

Posted on:

Wednesday 21st November 2012
View Replies!

Had to reinstall ODBC.net, now gives error... please help

, I had to reinstall ODBC.net as a result of a nasty computercrash. But now, when i try to run my applications, they all give the same error: Microsoft.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified Whats wrong Dit i forget to reinstall something
VIEWS ON THIS POST

258

Posted on:

Wednesday 21st November 2012
View Replies!

Connection failed plz help

Hi i have developed a windows application using VB.nety and mysql4.1 using connector. Its perfectly working on my machine.. But its not wotrking on my clients machine.. It shows an error connection failed... I have included the Mysql.Data.dll with in the setup..Do i need to install anything else to run the application... please help regards Anz
VIEWS ON THIS POST

177

Posted on:

Wednesday 21st November 2012
View Replies!

PL/SQL Query help ( Replace NULL with 0 )

I have a Sql query that returns null when there is nothing in the database. I want this query to return 0 whenever NULL is expected to be returned. How can this be done
VIEWS ON THIS POST

77

Posted on:

Wednesday 21st November 2012
View Replies!