We are working on a Db Oracle accessed by Oledb. We get connection using
MSDAORA.1 provider ad ORACLE 9.2 drivers on the PC.
We create datatables associated to the tables on the db, using FillSchema.
Some tables don't include primary key, even if they have the correct
structure on the db.
The datatables without primary key are few.
The others inlude the corrrect information.
The code we used is the following:
Dim da As OleDbDataAdapte r
Dim dt As New DataTable
Dim cmd As New OleDbCommand(sS elect, cn)
cmd.CommandTime out = 0
da = New OleDbDataAdapte r(cmd)
da.FillSchema(d t, SchemaType.Mapp ed)
dt.TableName = sTabella
We report the code we used for creating a table, whose datatable doesn't
include the primary key:
Create table UTTAPPR
(CAPP VARCHAR2(40) not null
,CPADRE VARCHAR2(80) not null
,CMENU VARCHAR2(40) not null
,NUMORD NUMBER(5,0) null
,TIPOMENU VARCHAR2(1) null
,CFUNZ VARCHAR2(30) null
,CGRUPPOMENU VARCHAR2(30) null
,XMENU VARCHAR2(50) null
,SHORTCUT NUMBER(10,0) null
,FORM VARCHAR2(50) null
,PARAMETRI VARCHAR2(2000) null
,PULSANTI VARCHAR2(2000) null);
alter table UTTAPPR
Add Constraint UTTAPPRPK
Primary key (CAPP,CPADRE,CM ENU);
Create Index UTTAPPR01
on UTTAPPR (NUMORD);
and the code for a table whose datatable includes the primary key:
Create table STTG001
(CDIT NUMBER(5,0) not null
,CENT VARCHAR2(6) not null
,XENT VARCHAR2(70) null
,XRID VARCHAR2(20) null
,XIND VARCHAR2(50) null
,CCOM NUMBER(7,0) null
,CIST VARCHAR2(6) null
,XIVA VARCHAR2(11) null
,CFIS VARCHAR2(16) null
,XTEL1 VARCHAR2(20) null
,XTEL2 VARCHAR2(20) null
,XFAX1 VARCHAR2(20) null
,XFAX2 VARCHAR2(20) null
,XEMA1 VARCHAR2(40) null
,XEMA2 VARCHAR2(40) null
,DVAD DATE null
,XNOT VARCHAR2(2000) null
,FRIGCAN NUMBER(5,0) null
,XINSUTE VARCHAR2(25) null
,XAGGUTE VARCHAR2(25) null
,XLAVUTE VARCHAR2(25) null);
alter table STTG001
Add Constraint STTG001PK
Primary key (CDIT,CENT);
Create Index STTG00101
on STTG001 (CDIT,CCOM);
Create Index STTG00102
on STTG001 (CDIT,CFIS);
Create Index XRID
on STTG001 (XRID);
Why does this happen just with few tables?
What is the problem with them?
Is it due to the table structure on Oracle, or to the FillSchema?
Thanks! 0 1285 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: black hawk |
last post by:
Hello,
i have a big problems, to install oracle 9i v9.2 Server to my "Windows
XP" with Service Pack 2 and all security and other updates from
Microsoft.
The "Universall Installer" (Standard Edition is Selected and only
Software is Selected) throws an exception, during the installation by
11 Percent installation progress!
|
by: black hawk |
last post by:
Hello,
i have a big problems, to install oracle 9i v9.2 Server to my "Windows
XP" with Service Pack 2 and all security and other updates from
Microsoft.
The "Universall Installer" (Standard Edition is Selected and only
Software is Selected) throws an exception, during the installation by
11 Percent installation progress!
|
by: Rick |
last post by:
I'm having problems with EnterpriseServices transactions running
against Oracle 9iR2.
I am inconsistently getting Oracle ORA-24761: Transaction Rolled Back
results mid-transaction. If I start the transaction and run it against
an object it might fail. If I rerun the same transaction again it
might work. But on trying again it might fail.
If I disable transactions <Transaction(TransactionOption.Disabled)>
the app runs and all the data...
|
by: Programmer |
last post by:
Hi All
Here is my problem
I'm using a SQLDataAdapter and DataSet
I use the method FillSchema(myDataset, SchemaType.Source)
The problem is that when i Check the default Values of the Dataset
i can see that the DefaultValue of the columns is system.dbnull!!!!
But in SQL Server i have put as default values in a bigint field the '0' and
|
by: NetRacer |
last post by:
hi,
i have a DataGrid with a DataView as source. the data is read correctly from
the db and shown on screen.
the problem appears, when i want to add some rows to the grid.
first it adds them and the ListChangedEvent from the DataView raises and the
new values are shown correctly.
but if i then click on the save button (which calls the EndCurrentEdit and
Update methods), the DataView suddenly only has the original rows and the
| |
by: Aaron |
last post by:
Hi,
The SqlDataAdapter.FillSchema method will automatically setup things
like the primary keys, auto increment, etc based on the settings on the
SQL Server. However, if you create a datatable using the SQL statement
that joins together data from multiple data tables, then FillSchema
does not work (as much? at all??). For example, if I use the following
query:
SELECT Material.*, Color.Color AS Color
|
by: Rich |
last post by:
Hello,
I want to use a dataAdapter to insert rows into a table on a sql server DB.
I understand that the DataAdapter will automatically handle concurrency
issues. So first I have to get a table to insert a row into. I have been
doing this:
da.SelectCommand = New SqlCommand("Select * from tbl1", conn)
da.FillSchema(ds, SchemaType.Source, "tbl1")
....
|
by: ReneMarxis |
last post by:
Hello all
first let me say i start getting an idea on how powerful data binding
is. You can hold your code as short as possible and also have a pretty
big flexibility.
Also thanks to this great community here, without you i bet many of us
would not succeed that fast.
So now to my problem :)
|
by: =?Utf-8?B?QWxleCBLLg==?= |
last post by:
Hi all
I noticed that if Select stmt returns dataset containing two tables,
executing FillShema only populates schema info for first table only.
Simple test: (.NET 2.0)
....
string strSQL = "Select * from tableA select * from tableB"
OleDbConnection cn = new OleDbConnection(strConnection);
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |