Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

RoyRose78

@RoyRose78
About
Posts
34
Topics
23
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • TableAdapters with Relation
    R RoyRose78

    Hello all, I have Typed-DataSet with 2 TableAdapters one for grades and one for courses. The TableAddapters have relation, so when I use grade row I can get the parent row from a property:

    foreach (DataSetCollege.GradesRow var in grades)
    {
    Response.Write( var.grade + var.CoursesRow.crsName);
    }

    My problem is that the var.CoursesRow is always null :confused: How do I use this property? Thanks, Roy.

    Database question help

  • How to use asp:ImageField in a GridView
    R RoyRose78

    Hi all, I'm using GridView with an ImageField column and somehow it doesn't display the pictures in my db. This is the code for adding new picture to the db (which I took from codeproject site) if (!Page.IsValid) return; if (!FileUpload1.HasFile) return; try { int len = FileUpload1.PostedFile.ContentLength; byte[] pic = new byte[len]; FileUpload1.PostedFile.InputStream.Read(pic, 0, len); int glrId = int.Parse(_GallaryDropDownList.SelectedValue); _engine.AddPicture(gallrId, pic, _DescTextBox.Text); } catch {... } The GridView markup is the following: <asp:GridView ID="GridView1" runat="server" ForeColor="Navy" Width="100%" AutoGenerateColumns="False" DataKeyNames="picID" DataSourceID="_PicturesSqlDataSource" Font-Names="Arial" Font-Size="11pt"> <Columns> <asp:BoundField DataField="picID" HeaderText="picID" InsertVisible="False" ReadOnly="True" SortExpression="picID" Visible="False" /> <asp:BoundField DataField="picGlrID" HeaderText="picGlrID" SortExpression="picGlrID" Visible="False" /> <asp:ImageField DataAlternateTextField="picDEscription" DataImageUrlField="picData" HeaderText="picture"> </asp:ImageField> <asp:BoundField DataField="picDEscription" HeaderText="description" SortExpression="picDEscription" /> <asp:TemplateField> <ItemTemplate> <asp:CheckBox ID="_SelForDelCheckBox" runat="server" /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> When I go to that page, I can see the rows but I cannot see the images, I can see the alt text instead.. Can you help me with that? What am I doing wrong? Thank you, Roy.

    ASP.NET html database sysadmin help tutorial

  • weird situation with autopostback
    R RoyRose78

    I'm king of lost here... this situation is very weird because the event is not fired when I select the first item in my drop down list..! Let me tell you the exact problem: I have a user control with a drop down list control. This control is auto post back to server when index is changed. When I select the second(or third, forth etc) item - the event method _TableDropDownList_SelectedIndexChanged is being called. When I select the first item this event isn't fired - so _TableDropDownList_SelectedIndexChanged is not being called! I use breakpoints in this event method and also in page_load method and I can say that page_load is happend but _TableDropDownList_SelectedIndexChanged isn't. it just ignores it somehow when I select the first item... Someone please :(( RoyRose

    ASP.NET debugging database help

  • weird situation with autopostback
    R RoyRose78

    I have another comment.. The problem was with index 0 I realizes that when I set the item in index 1 to selected = true the event not fired to it! <asp:DropDownList ID="_TableDropDownList" ... OnSelectedIndexChanged="_TableDropDownList_SelectedIndexChanged"> <asp:ListItem>cities</asp:ListItem> <asp:ListItem Selected="**True**">courses</asp:ListItem> </asp:DropDownList> I set all items with Selected="False" but still when I choose the item in index zero it won't fire the event..

    ASP.NET debugging database help

  • weird situation with autopostback
    R RoyRose78

    Hey all, I have a DropDownList control in my page. I set the AutoPostBack property to true and also created the SelectedIndexChanged event method. Everytime I change the index it supposes to call the SelectedIndexChanged event but it only call it when index is not zero :mad: With the use of debugger and breakpoint at this method I realized that when the dropDownList's SelectedIndex is not zero - the event is raized but when the index is zero it ignores the event Please help :sigh: RoyRose

    ASP.NET debugging database help

  • ViewState Problem
    R RoyRose78

    There is no postback & it's find with me cause I don't need anything from the server. All I want is that when I press IE's back button it'll go to the state it was and not to an imposible state!

    ASP.NET database design sysadmin help question

  • ViewState Problem
    R RoyRose78

    Hey all, I'm having this weird problem with an aspx page. In this page I have 2 dropDownList controls: _TableDropDown - has items that I entered at design time. the items are: Cities, Titles etc.. _RowsDropDown - filled after _TableDropDown is autoPostBack to server from DB(when selecting Cities of _TableDropDown the _RowsDropDown is filled with YNC, Paris etc.. and when selecting Titles of _TableDropDown the _RowsDropDown is filled with Manager, Developer etc...) everything is ok until I press the back button.:sigh: this is what I did from IE: 1. got the page the first time - the _TableDropDown with Cities and _RowsDropDown with the data from DB. 2. changed the _TableDropDown value to Titles - postback occured and the page got back to me with the right data. 3. press back button - now the _TableDropDown is set with Titles value BUT _RowsDropDown values filled with cities data.. I know that when pressing back button of IE there is NO postback to the server so I guessed it's something with the viewState... Is someone familier with the problem? What should I do to get over this?:(( Thank you very much, RoyRose

    ASP.NET database design sysadmin help question

  • All Controls in my user control are null...
    R RoyRose78

    OK, go it! I use the user control's ctor but it's not the way to load it manually.. That's the way: Control _control = LoadControl("ActivitiesControl.ascx"); Roy.

    ASP.NET csharp visual-studio collaboration question

  • All Controls in my user control are null...
    R RoyRose78

    Hey all, I have a simple user control with panel on it. when I create this user control (manualy and not dragging it from solution explorer) somehow all controls inside this user control are null... In the user control I try to use the panel object in some method I've created but the panel object is null, so it throws an exception. I'm sure I've done something wrong but, Do I need to create the inner controls of the user control also?? p.s - I'm using Visual Studio 2005 Team Edition. Thanks, Roy.

    ASP.NET csharp visual-studio collaboration question

  • System Files in Deployment
    R RoyRose78

    Hello all, I've created a setup project in visual studio 2005 in c#. When I run the setup.exe to installation folder step, I realized that it installed some other data in system driver-usually drive c (press the Disk Cost button) even if I installed the application in other drive (let's say drive d). Does anyone knows what's this data? this data is 1.2 Mb.. RoyRose.

    C# csharp visual-studio sysadmin question workspace

  • Table change event
    R RoyRose78

    Hey all, Is there a way to know when table changed and who changed it? is there a default table that logs those kinds of changes in MSSQL 2000? Thanks RoyRose.

    Database sql-server question

  • How IIS manages reuests?
    R RoyRose78

    the answer is very simple.. I just don't need to get into it :-D the IIS is smart enought to handle this problem. thank again all Roy.

    ASP.NET csharp asp-net visual-studio windows-admin business

  • How IIS manages reuests?
    R RoyRose78

    Hey BLOEDHOND, Tanks for replying. This is a good thing but I don't use XML web service in my application.. Thank again.

    ASP.NET csharp asp-net visual-studio windows-admin business

  • How IIS manages reuests?
    R RoyRose78

    Hey guys, I'm writing an asp.net 3-tier application that uses data-source component, business-logic component and application component. The BL and the DS components are designed as singleton classes, so when clients request for data, they get the same BL object (and DS object) so IIS won't create multiply BLs/DS's objects. I want to know how the IIS manages the requests. if IIS will create a thread for each client there will be a race condition between those threads that want to run the same method. if so, I probably create the methods as "synchronized code region" which means that only one thread can enters a method at a time... do I need to get into it at all?... Thanks. Roy. p.s - I using visual studio.net 2003 and IIS 5.1

    ASP.NET csharp asp-net visual-studio windows-admin business

  • DataGrid &amp; DataRelation
    R RoyRose78

    Hey all, I have DataRelation object between 2 tables & 2 DataGrids. for some reasons, I delete the relation, activate an operation on the tables & then create the relation back. here is some code: //before the operation starts: Ds.Relations.Clear(); Ds.Tables["Cust2"].Constraints.Clear(); //after the operation DataColumn dc1 = Ds.Tables["Cust1"].Columns["Id"]; DataColumn dc2 = Ds.Tables["Cust2"].Columns["Id"]; DataRelation Dr = New DataRelation("cust1to2", dc1, dc2); Ds.Relations.Add(Dr); everything is ok until now. but when I tried to connect the tables to the datagrids: DtGrd1.SetDataBinding(Ds, "Cust1"); DtGrd2.SetDataBinding(Ds, "Cust1.cust1to2"); I get the exception: "Cannot have a relationship between tables in different DataSets" does anyone know what is going on?? thanks, RoyRose

    Database question

  • DataGrid &amp; DataRelation
    R RoyRose78

    Hey all, I have DataRelation object between 2 tables & 2 DataGrids. for some reasons, I delete the relation, activate an operation on the tables & then create the relation back. here is some code: //before the operation starts: Ds.Relations.Clear(); Ds.Tables["Cust2"].Constraints.Clear(); //after the operation DataColumn dc1 = Ds.Tables["Cust1"].Columns["Id"]; DataColumn dc2 = Ds.Tables["Cust2"].Columns["Id"]; DataRelation Dr = New DataRelation("cust1to2", dc1, dc2); Ds.Relations.Add(Dr); everything is ok until now. but when I tried to connect the tables to the datagrids: DtGrd1.SetDataBinding(Ds, "Cust1"); DtGrd2.SetDataBinding(Ds, "Cust1.cust1to2"); I get the exception: "Cannot have a relationship between tables in different DataSets" does anyone know what is going on?? thanks RoyRose

    C# question

  • String to code?
    R RoyRose78

    Hey Tom, I'll tell you exactly what I mean. I want to have a control (like label) that the Text property is a code that refers to table field plus other manipulation, for example label.text = "Day(Orders.OrderDate)" will get the name of the day the customer bought a product... OR label.text = "Age(table["customer"].Row["BirthDate"])" Age is a function that gets a dateTime and returns the age... It's very similar to script code. I can manipulate only the current row. I won't be able to change the DB just to show it. I use other databinded labels, when I walk throught the rows, the label's data change & also the expression-labels suppose to change...

    C# help question

  • String to code?
    R RoyRose78

    Hi all, Can I convert a string into code? For egs. if I have textbox with the text: "DataSet1.Tables[0].Rows[0][0].ToString()" I want to convert it to code.. I must say that I want to use objects that the application creates, so the object ICodeCompiler cannot help me.. Is there a way of doing it...??? Thanks RoyRose

    C# help question

  • Problem creating database trigger from vb.net - Help!
    R RoyRose78

    Hey, Well, I guess this some kind of bug that OleDbCommand cannot create trigger or SPs but when I changed the objects to Oracle object (OracleConnection, OracleCommand, OracleDataAdapet, OracleTransaction..) Everything works! Thank You RoyRose

    Visual Basic database help oracle csharp

  • Problem creating database trigger from vb.net - Help!
    R RoyRose78

    Hello everybody, I've cretaed a database application that build tables/triggers/stored-procedures at runtime (Oracle DB 10g). After all tables created, the application starts creating the triggers and the SPs. this is small code: -------------------------------------------------------------------------------- Public Shared Sub CreateTriggers() Dim Err As String = "" Dim HasErr As Boolean = False Dim CmdTmp As OleDbCommand = New OleDbCommand With CmdTmp .Connection = oConn 'creating trigger(s) .CommandText = "CREATE TRIGGER change_status AFTER INSERT ON invoices " & _ "REFERENCING NEW AS newRow FOR EACH ROW " & _ "BEGIN update orders set orders.order_status='Close' where orders.orderID = :newRow.orderID; " & _ "END change_status;" .CommandType = CommandType.Text Try .ExecuteNonQuery() Catch ex As Exception HasErr = True Err += ex.Message + Chr(13) End Try 'creating stored-procedure(s) .CommandText = "CREATE OR REPLACE PROCEDURE Add_Inventory(SID varchar2, IID varchar2, Amount Number ) " & _ "IS " & _ "BEGIN " & _ "Insert Into Inventory(StoreID, ItemID, Inv_Amount, Inv_DateM, Inv_DateY) " & _ "Values(SID, IID, Amount, To_Number(To_Char(SysDate, 'MM')), To_Number(To_Char(SysDate, 'YYYY'))); " & _ "END;" Try .ExecuteNonQuery() Catch ex As Exception HasErr = True Err += ex.Message + Chr(13) End Try ... ... -------------------------------------------------------------------------------- now, I dont get exceptions when the app runs, but the triggers\SPs were NOT created.. I also created tables at run-time and there is no problem..the tables have been created... There is no problem creating the triggers\SPs from sqlplus with the same user so I dont think that is a permissions problem (when I copy the trigger/SP code & paste it in sqlplus, I get the message(s) Trigger created or procedure created ) I also CAN delete trigger(s)\SP(s) from the application but CANNOT create them.. what could be the problem? please help me out here..I'm stuck... Thank You RoyRose

    Visual Basic database help oracle csharp
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups