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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
C

ceiral

@ceiral
About
Posts
3
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Failed to update database "C:\BCPORTAL\APP_DATA\BCANCER.MDF" because the database is read-only.
    C ceiral

    Hello. I am working on a website. For now whenever I want to test it I would just run it from localhost using IIS. An error occurred after transferring the work to another laptop. Everything ran smoothly until came to the part where there is a need to update/insert data to the database. I got this error saying that I am not able to update the database because it is read-only. Now the error only occurred when I ran the website from localhost using IIS. The process of updating/inserting when smoothly when I ran the website from Visual Studio. I searched for every possible solution and found out several ones 1. Set the App_Data folder attribute to not 'Read-only'. - Done that but the folder automatically set back to 'Read-only' each and everytime. 2. Execute the following sql query

    ALTER DATABASE bcancer SET READWRITE

    - Done that also but still the database is in read-only mode. Can somebody help me out on this? Thank you very much for your attention.

    ASP.NET database help csharp visual-studio windows-admin

  • MySQL Union function
    C ceiral

    Hello everyone, I was wondering if somebody would kindly give their opinion to sort the problem I'm facing right now. Supposedly I have two queries; Query 1

    SELECT product,customer,SUM(qty)
    FROM tblproduct
    WHERE trans_date=20090303
    AND trans_time>='19:00:00'
    AND trans_time<='23:59:59'
    AND from_oper=1100
    GROUP BY product

    Query 2

    SELECT product,customer,SUM(qty)
    FROM tblproduct
    WHERE trans_date=20090304
    AND trans_time>='00:00:00'
    AND trans_time<='06:59:59'
    AND from_oper=1100
    GROUP BY product

    In which the results is as follows: Query 1 Result

    product customer SUM(qty)
    A John 20
    A Adam 3
    B Jenny 15
    C John 9
    D Abu 8

    Query 2 Result

    product customer SUM(qty)
    A John 5
    D Ali 12
    D Abu 3

    I want the two queries to work as a single query so I joined both of them using UNION like the following:

    (SELECT wlth_prod_new,customer,SUM(from_qty)
    FROM tblusm_wiplth
    WHERE trans_date=20090303
    AND trans_time>='19:00:00'
    AND trans_time<='23:59:59'
    AND from_oper=1100
    GROUP BY wlth_prod_new)
    UNION
    (SELECT wlth_prod_new,customer,SUM(qty)
    FROM tblusm_wiplth
    WHERE trans_date=20090304
    AND trans_time>='00:00:00'
    AND trans_time<='06:59:59'
    AND from_oper=1100
    GROUP BY wlth_prod_new)

    and the result would be a union of the results from the first two queries mentioned.

    product customer SUM(qty)
    A John 20
    A Adam 3
    B Jenny 15
    C John 9
    D Abu 8
    A John 5
    D Ali 12
    D Abu 3

    By looking from the query result above, I seems that there is a redundant data for product A purchased by John (bold) and product D purchased by Ali. I wanted the query would only return the sums of qty for product X that is purchased by customer Y. In which to my imagination the result should be like this:

    product customer SUM(qty)
    A John 25
    A Adam 3
    B Jenny 15
    C John 9
    D Abu 11
    D Ali 12

    Can somebody give

    MySQL database mysql sales help

  • gridview paging using asp.net
    C ceiral

    Hello Guna, Well I might not get your whole idea of gridview paging so please bear with me if I am wrong ;P but there are options in the GridView properties that allows for paging right? and recalling to my limited knowledge I don't think there is any need to use the SqlSever ROW_Number() function. This is my first time trying to give opinions and stuffs so sorry for any misguidance and lack of knowledge :sigh:

    .NET (Core and Framework) csharp asp-net
  • Login

  • Don't have an account? Register

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