الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

خطاء في الكود ؟؟ مجنني !!!

مغلق
بدأه Salih_B في 30 ديسمبر 2003 · 5 رد · 2,550 مشاهدة · في قواعد بيانات Oracle
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

طلب عاجل لو سمحتوا ....

السلام عليكم

يضهر لدي خطاء بهذ الكود لااعرف ماهوا السبب الفعلي له ؟؟

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 
Button1.Click
Dim cn1 As New OleDbConnection("Provider=MSDAORA.1;Password=pas;User ID=abc;Data Source=db1")
        Dim ADPT As New OleDbDataAdapter("Select * From GUSTBOOK", cn1)
        Dim num1 As Integer
        Dim data_set1 As New DataSet()
        cn1.Open()
        ADPT.Fill(data_set1, "GUSTBOOK")
        num1 = data_set1.Tables("GUSTBOOK").Rows.Count 
        Dim InsertCMD As New OleDbCommand("Insert Into GUSTBOOK (NUM,NAME_GUST,WEP_GUST,EMAIL_GUST,DESC_GUST1) Values ('" & num1 & "','" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "')", cn1)
        InsertCMD.ExecuteNonQuery()
    End Sub

والخطاء هو ORA-12154: TNS: لا يمكن تحليل اسم الخدمة

ارجوا الافاده لو سمحتوا ...

#2

راجع ردي في ال www.vb4arab.com/vb

#3

لاجديد في اقتراحك نفس كلامك انا واضعه في طلب الاتصال ..

مع شكري الجزيل لك لتفاعلك مع الموضوع....

تحياتي لك ولمزيدا من الحلول ....

#4

أخي العزيز ...

هل تريد ان تربط الفيجوال بيسك مع الاوراكل داتابيس ...؟؟؟

لربط الفيجوال مع داتا بيس انت تحتاج عمل ربط من Net8 Configuration Assistant ...

وبعدها تعمل ربط مع الداتابيس ... اما عن طريق ADO او DAO ... ODBC

المطلوب منك ...هو انك تعمل حاليا Net8 Configuration Assistant

وبعدها جرب ان توصل بينهما ....وخبرني اذا اشتغلت عندك الفورم او لا...

تم تعديل هذه المشاركة بواسطة حسين عبدالله أحمد حسن في 30 ديسمبر 2003 في 14:00

#5
Problem Description 
=================== 
You were previously able to connect from Oracle Express Server (OES) 
on WinNT to an Oracle database. You installed another Oracle product, 
(for example, Oracle Application Server (OAS)) in its own Oracle Home. 
Now, when trying to connect, you receive the following error: 

ORA-12154: TNS:could not resolve service name 

For example, if you attempt to connect to a Relational Access Manager 
(RAM) database from Oracle Express Objects (OEO), an error similar to 
the following may occur: 

The database pointer is NULL 

*<DATABASE NAME> <DDATABASE NAME> Analyzer version 6.2*6.2.0*GUEST*<DATE> <TIME> 
* 

<TIME>: Scoping has been turned off. 

NORMAL STARTUP 
ERROR: ORA-12154:  TNS: could not resolve service name 

Detail: 
Error #132 in XPDBOBJS.DLL: Non-fatal (0300): The database pointer is NULL. 
Error #12150 in XPCUBE: Non-fatal (0300): Data Manager is unable to generate  
transmission. 
Error #10300 in XDMRESP: Non-fatal (0300):   
*<DATABASE NAME> < DDATABASE NAME> Analyzer version 6.2*6.2.0*GUEST*<DATE>  
<TIME>* 
  
<TIME>: Scoping has been turned off. 
NORMAL STARTUP 
ERROR: ORA-12154: TNS:could not resolve service name 


If you try to connect to Oracle from Express Administrator, an error  
similar to the following may occur: 

The following error occurred (0) [Oracle][ODBC](Ora)ORA-12154: TNS:could not  
resolve service name 

If you try to connect to a RAM database from an Oracle Express Web  
Agent (OWA) application, an error similar to the following may occur: 

In stored procedure XWD_RAMSTARTUP: The following Express Server error occurred: 
ORA-12154: TNS:could not resolve service name. 
In stored procedure XWD_INIT: The following Express Server error occurred: D1  
does not exist in any attached database.  

Problem Explanation 
=================== 
OES is unable to locate a TNSNAMES.ORA file with a correct entry  
referencing the Oracle instance to which you are attempting to 
connect. 

Solution Description 
==================== 
Follow this procedure to avoid TNS errors: 

1) Make sure you have a correct TNSNAMES.ORA entry to connect to  
   Oracle as follows: 

   a) Run the Net8 Assistant. 
   b) Open the Net Service Names list. 
   c) Select the service name you want to connect to and click the  
      "Test Service Name" icon.   

   Refer to Help in Net8 Assistant for more information on creating  
   and configuring a service name. 

2) If your system has more than one Oracle Home that contains a  
   TNSNAMES.ORA file, open the files in a text editor such as Notepad 
   and determine which TNSNAMES.ORA file has the correct entry.   

3) Take one of the following actions: 

   -- Using the Oracle Home Selector utility  (go to Start... 
      Programs...Oracle for Windows NT...Oracle Home Selector), make  
      the Oracle Home containing the TNSNAMES.ORA file with the  
      correct entry the primary Oracle Home, and then restart the  
      machine for the change to take effect. 

   -- Rename the TNSNAMES.ORA file without the correct entry to, 
      for example, TNSNAMES.OLD, and copy the correctly configured  
      TNSNAMES.ORA to that location so that each Oracle Home will  
      have an identically configured TNSNAMES.ORA file. 

Solution Explanation 
==================== 
Oracle Express Server uses OCI by default to connect to an Oracle 
database. OES must be able to access a TNSNAMES.ORA file with a  
correct entry for the Oracle instance to which you are trying to  
connect. 

If your connection was previously working and you installed a new  
Oracle product in another Oracle Home, the new product may have  
installed its own TNSNAMES.ORA file and set the new Oracle Home as  
the primary home during the installation process. 

OES uses the TNSNAMES.ORA file in the primary Oracle Home to connect  
to Oracle; the errors described above occur if it does not find a  
correctly configured entry in the file. 

TNSNAMES.ORA is located in a directory similar to the following: 

<Oracle Home>\Net80\Admin 

<Oracle Home>\Network\Admin
#6

اشكر كل من تجاوب معي ...

نفس الكود اشتغل ولم اعدل به اي شي

اتدرون ماهي المشكله ؟؟؟؟

MySql قمت بازالتها من الجهاز بشكل كامل وقد عمل الكود بشكل ممتاز ..

اعتقد بانه يوجد تعارض بين MySql وبين Oracle

تحياتي للجميع !!!

هذا الموضوع مغلق.

مواضيع مشابهة