Op, izvinjavam se mmix, moja greska je sto nisam postovao ceo kod, ali mi se cinilo mnogo...Evo ovako izgleda cela inicijalizacija (same dekleracije cu preskociti, one su iznad naravno)
Code:
private void InitializeComponent()
{
this.bdpSelectCommand1 = new Borland.Data.Provider.BdpCommand();
this.bdpConnection1 = new Borland.Data.Provider.BdpConnection();
this.bdpInsertCommand1 = new Borland.Data.Provider.BdpCommand();
this.bdpUpdateCommand1 = new Borland.Data.Provider.BdpCommand();
this.bdpDeleteCommand1 = new Borland.Data.Provider.BdpCommand();
this.bdpDataAdapter1 = new Borland.Data.Provider.BdpDataAdapter();
this.dsMestoNetipski = new System.Data.DataSet();
this.tabMesto = new System.Data.DataTable();
this.dcMestoID = new System.Data.DataColumn();
this.dcNazivMesta = new System.Data.DataColumn();
this.dcPostanskiFah = new System.Data.DataColumn();
((System.ComponentModel.ISupportInitialize)(this.bdpDataAdapter1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dsMestoNetipski)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tabMesto)).BeginInit();
//
// bdpSelectCommand1
//
this.bdpSelectCommand1.CommandOptions = null;
this.bdpSelectCommand1.CommandText = "SELECT mestoID, nazivMesta, postanskiFah FROM MESTO";
this.bdpSelectCommand1.CommandType = System.Data.CommandType.Text;
this.bdpSelectCommand1.Connection = this.bdpConnection1;
this.bdpSelectCommand1.ParameterCount = ((short)(0));
this.bdpSelectCommand1.SchemaName = null;
this.bdpSelectCommand1.Transaction = null;
this.bdpSelectCommand1.UpdatedRowSource = System.Data.UpdateRowSource.None;
//
// bdpConnection1
//
this.bdpConnection1.ConnectionOptions = "transaction isolation=ReadCommitted;blob size=1024";
this.bdpConnection1.ConnectionString = "database=Partner_Ing_GUID;hostname=localhost;assembly=Borland.Data" +
".Mssql,Version=1.1.0.0,Culture=neutral,PublicKeyToken=91d62ebb5b0" +
"d1b1b;vendorclient=sqloledb.dll;provider=MSSQL;username=sa;passwo" +
"rd=";
//
// bdpInsertCommand1
//
this.bdpInsertCommand1.CommandOptions = null;
this.bdpInsertCommand1.CommandText = "INSERT INTO MESTO (mestoID, nazivMesta, postanskiFah) VALUES (?,?," +
"?";
this.bdpInsertCommand1.CommandType = System.Data.CommandType.Text;
this.bdpInsertCommand1.Connection = this.bdpConnection1;
this.bdpInsertCommand1.ParameterCount = ((short)(0));
this.bdpInsertCommand1.SchemaName = null;
this.bdpInsertCommand1.Transaction = null;
this.bdpInsertCommand1.UpdatedRowSource = System.Data.UpdateRowSource.None;
//
// bdpUpdateCommand1
//
this.bdpUpdateCommand1.CommandOptions = null;
this.bdpUpdateCommand1.CommandText = "UPDATE MESTO SET mestoID = ?, nazivMesta = ?, postanskiFah = ?";
this.bdpUpdateCommand1.CommandType = System.Data.CommandType.Text;
this.bdpUpdateCommand1.Connection = this.bdpConnection1;
this.bdpUpdateCommand1.ParameterCount = ((short)(0));
this.bdpUpdateCommand1.SchemaName = null;
this.bdpUpdateCommand1.Transaction = null;
this.bdpUpdateCommand1.UpdatedRowSource = System.Data.UpdateRowSource.None;
//
// bdpDeleteCommand1
//
this.bdpDeleteCommand1.CommandOptions = null;
this.bdpDeleteCommand1.CommandText = "DELETE FROM MESTO WHERE mestoID = ? AND nazivMesta = ? AND postans" +
"kiFah = ?";
this.bdpDeleteCommand1.CommandType = System.Data.CommandType.Text;
this.bdpDeleteCommand1.Connection = this.bdpConnection1;
this.bdpDeleteCommand1.ParameterCount = ((short)(0));
this.bdpDeleteCommand1.SchemaName = null;
this.bdpDeleteCommand1.Transaction = null;
this.bdpDeleteCommand1.UpdatedRowSource = System.Data.UpdateRowSource.None;
//
// bdpDataAdapter1
//
this.bdpDataAdapter1.Active = true;
this.bdpDataAdapter1.DataSet = this.dsMestoNetipski;
this.bdpDataAdapter1.DataTable = this.tabMesto;
this.bdpDataAdapter1.DeleteCommand = this.bdpDeleteCommand1;
this.bdpDataAdapter1.InsertCommand = this.bdpInsertCommand1;
this.bdpDataAdapter1.SelectCommand = this.bdpSelectCommand1;
this.bdpDataAdapter1.StartRecord = 0;
this.bdpDataAdapter1.UpdateCommand = this.bdpUpdateCommand1;
//
// dsMestoNetipski
//
this.dsMestoNetipski.DataSetName = "dsMestoNetipski";
this.dsMestoNetipski.Locale = new System.Globalization.CultureInfo("sr-SP-Latn");
this.dsMestoNetipski.Tables.AddRange(new System.Data.DataTable[] {
this.tabMesto});
//
// tabMesto
//
this.tabMesto.Columns.AddRange(new System.Data.DataColumn[] {
this.dcMestoID,
this.dcNazivMesta,
this.dcPostanskiFah});
this.tabMesto.Constraints.AddRange(new System.Data.Constraint[] {
new System.Data.UniqueConstraint("Constraint1", new string[] {
"mestoID"}, true),
new System.Data.UniqueConstraint("Constraint2", new string[] {
"postanskiFah"}, false)});
this.tabMesto.PrimaryKey = new System.Data.DataColumn[] {
this.dcMestoID};
this.tabMesto.TableName = "MESTO";
//
// dcMestoID
//
this.dcMestoID.AllowDBNull = false;
this.dcMestoID.ColumnName = "mestoID";
this.dcMestoID.DataType = typeof(System.Data.SqlTypes.SqlGuid);
//
// dcNazivMesta
//
this.dcNazivMesta.AllowDBNull = false;
this.dcNazivMesta.ColumnName = "nazivMesta";
this.dcNazivMesta.DataType = typeof(System.Data.SqlTypes.SqlString);
//
// dcPostanskiFah
//
this.dcPostanskiFah.ColumnName = "postanskiFah";
this.dcPostanskiFah.DataType = typeof(System.Data.SqlTypes.SqlInt64);
((System.ComponentModel.ISupportInitialize)(this.bdpDataAdapter1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dsMestoNetipski)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tabMesto)).EndInit();
}
Ja koliko sa proverio sve je tu sto si mi rekao...Kazem ti, taj data set sam prevukao iz Tool Box-a na Design view komponente i u Object Inspector-u mu dodao kolone, naziv tabele, constraints (i jesam prvo stavio PK za mestoId, a posle Unique za postanskiFah) i zato mi nije jasno zasto ne sljaka...
