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
L

lupin68

@lupin68
About
Posts
16
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Printing Datagrid report
    L lupin68

    I have a Datagrid that is generated as a report. When it's printed, the last line of evey page is split onto the next page(top half on the preceding page). Is there a way to control this? thanks

    ASP.NET question

  • from DateTime to Int
    L lupin68

    Thanks to all. DateTime.Today.ToString("ddMMyyyy") did the trick!

    ASP.NET tutorial

  • from DateTime to Int
    L lupin68

    Does anyone know how to convert a datetime format(dd/mm/yyyy) to a string (i.e removing the "/") Thx

    ASP.NET tutorial

  • Unable to read NULL DateTime value
    L lupin68

    Here's my problem. I have a SQL db Table with a DateTime column. On my web app, I have a DataGrid that displays a list of info from that table (Order, Customer, Date of Delivery, etc..) When I read the DB, if the Date of Delivery doesn't exist I display nothing in the Cell. Alternately, When the order is delivered, the Date is displayed in that cell. The problem is this one: When there is no delivery date in the DB, the default on the DB is "01/01/1900 12:00AM". Now in my app, if I get the 01/01/1900 string for the Date, I don't display the value in the Cell. This was working fine until I installed the app and DB at the Customer. After running the app, the value for undelivered orders was displayed in the cell as 1/1/1900. So I changed my code again to check for the 01/01/1900 AND 1/1/1900 string and not display the value. This worked fine but I am not happy the way I check for the value of the date. After posting my problem in tan SQL forum, someone suggested to put the default value of that column to NULL, which is the logical thing to do. The only problem is that when I do that, I get an casting ERROR of my DateTime value (which is normal because NULL is not a Date value:zzz:) I'm reading from the DB. Here's my code to get the list of orders:sigh:: public static ArrayList GetAllOrders() { SqlDataReader reader = null; ArrayList orders = null; try { reader = SqlHelper.ExecuteReader(Resource.ConnectionString, CommandType.StoredProcedure, SP_GET_ORDERS, null); if (reader.HasRows) { orders = new ArrayList(); while (reader.Read()) { Order order = new Order(); order.WayBill = reader["WayBill"] as string; order.OrderDate = (DateTime)reader["OrderDate"]; order.Shipper.name = reader["Shipper"] as string; order.Items = (int)reader["Items"]; order.Weight = (int)reader["Weight"]; orders.Add(order); order = null; } } return orders; } This code reads a Stored Procedure where my order object has a OrderDate property casted to DateTime. Can anyone offer a suggestion/workaround for this problem.. Thanks a lot Pat

    ASP.NET database help sharepoint sales learning

  • Question about hiding duplicates
    L lupin68

    In Your insert command change INSERT INTO MODEL(ModelName,ModelID) to INSERT INTO MODEL(ModelName,MakeID) as you can't insert a primary key value. When you update, you should update one table only (usually the primary table that holds all the info). If you have made the relationships between the tables correctly it will work. I don't know what you want to modify exactly, it seems you're modifying all the tables, even Make. Send me a screen capture of your user intereface flyboylb@yahoo.fr so I understand better what this app does. It seems that it can all be simplified easily.;)

    ASP.NET database help question

  • display different item in the cell under same column
    L lupin68

    This looks like a Cool app Dr X. I'm just wondering about the DataGrid functionality in here. Is Column 1 static or is it something you're reading from a table? How many tables are involved? Just for personal info

    ASP.NET tutorial question

  • Question about hiding duplicates
    L lupin68

    Please post your query. I guess you're using access: Open the quey, on the menu bar select View / SQL view, Copy and Paste it here. It's all based on how you're updating the tables.

    ASP.NET database help question

  • display different item in the cell under same column
    L lupin68

    What are you trying to achieve? Datagrid is usually used as a list to display and edit data from a DB. Based on what your saying, you're probably better of building a Table dynamically and insert whatever dontrols you want wherever you want. Then again it all depends on what you want to do. P.

    ASP.NET tutorial question

  • Question about hiding duplicates
    L lupin68

    What I don't understand is How and Why you can the same model number more than once? Is this data that you are displaying only or is it data that was entered by users? Anyways, a good DB design would be to decompose your DB as much as possible. This is very important because it will allow you to easily modify everything in the future (expand, etc.). Again, presuming that you are displaying a catalog data (not data entered by use) here's an example (I will take only Make and Model for this example): You should have 2 tables tMake and tModel tMake should have 2 columns: MakeID, MakeName Make ID will be the primary key Make will be the name of the Make (Buick, etc.) tModel should have 3 columns: ModelID, ModelName and MakeID ModelID is the Primary Key ModelName is the Name of the Model (impala, suburban) MakeID id the Primary key of the tMake table (you should make a relation between this column and the MakeID column of your tMake table) Hope this helps, tell me what you think

    ASP.NET database help question

  • Question about hiding duplicates
    L lupin68

    Your problem is not much of an ASP.NET problem but probably more of a DataBase design issue. Please explain a bit more what the application is supposed to do: 1) People buy cars? 2) How many tables in you DB do you have? Basically Models and Makes should be unique and should not be repeated in your DB. Explain to me also in which case you would have 2 entries for a model "593b" In general (and I don't know what you want to do exactly, but)the Model of a car should be referred to the Car as a ModelID..

    ASP.NET database help question

  • Regular Expression
    L lupin68

    Good site for consulting RegExp. and building your own http://regexlib.com

    ASP.NET business regex

  • storing pages in an array
    L lupin68

    I am not vey sure I entirely understand, but you are trying to retreive all the info of a particular Customer/Category etc. (from a DB I presume?) How do you display the info in the 3 pages (Customer, category, etc.)? You use a DataGrid?

    ASP.NET csharp asp-net algorithms data-structures help

  • Regular Expression
    L lupin68

    Very easy, try this ^([a-zA-Z0-9@*#]{4,60})$ If you don't want the wild characters (@*#) you can remove them. Let me know Patrick

    ASP.NET business regex

  • DataGrid binding and Viewstate problem
    L lupin68

    Neat! thx PayBack works well.;)

    ASP.NET help database wpf wcf question

  • DataGrid binding and Viewstate problem
    L lupin68

    Thanks guys, PayBack, this sounds great but I am not quite sure I understand how to do it. By the way, I don't use a DataTable, nor a DataSet. My search (let's say OrderNo.) goes like this { Order order = new Order(); ArrayList ordernumber = order.GetOrders(txtOrderno.Text, etc...) DataGrid.DataSource = ordernumber; DataGrid.DataBind(); } For another search (let's say the Customer ID), the ArrayList would be populated using a different method. The DB query (Storedprocedure) is called in another CS called by the GetOrders method. I am not sure how I could apply the ViewState("SearchParameter") = "_msg_date" in this context. Thanks again

    ASP.NET help database wpf wcf question

  • DataGrid binding and Viewstate problem
    L lupin68

    Hi folks, here's the problem I have been stuck on: After I modify a row in my Datagrid, I want to reload just the row that was modified. I still want to issue a DataBind but I dont want to get the entire list that is displayed in the Datagrid. Just Update the row that was modified. The reason for that is that the datagrid can display a different list based on different searches that the user submits. So when the Modify button is pressed (the modify button is not an ItemCommand), I cannot do a databind based on what his initial search was, because I don't know what parameters to pass(to the query). Someone told me I could use the ViewState to store my DG and the issue a rebind. Is this possible? How would it work? Thanks for ANY help. :(( Patrick

    ASP.NET help database wpf wcf question
  • Login

  • Don't have an account? Register

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