Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • PCharb 22 posts 42 karma points
    May 04, 2011 @ 22:31
    PCharb
    0

    Sql query

    Hi,

    i can't find how do connect to the umbraco DB with razor.
    I want to connect myself on the database and pass a query that
    a member will pass to me in the umbraco DB. Is there somebody who already know how??

  • Toni Becker 146 posts 425 karma points
    May 05, 2011 @ 20:04
    Toni Becker
    0

    hy PCharb. I#m thinking it's the best to look through the documentation of asp.net/webmatrix or the mvc3 doc. You could e.g. use an external helper to let your flow and use this in your macro(razor) scripts. Will test it out in the next days and weeks and inform you. so long.

    Ah wait theres a place called nuget.org inside the package gallerie is an facebook helper using databaseconnection look through the code and you will find some good points to start.

    So long

  • Toni Becker 146 posts 425 karma points
    May 05, 2011 @ 20:14
  • Mads Krohn 211 posts 504 karma points c-trib
    May 05, 2011 @ 21:57
    Mads Krohn
    0

    I must admit I'm not entirely sure about what you are trying to achieve. However, if what you wan't to do is execute a sql query against the Umbraco database using Razor syntax, I think you might have gotten a few concepts mixed up. Either way I strongly recommend you not to query the Umbraco database directly. Instead, try and use the API's provided by Umbraco.

    If you require any further assistance on the core concepts of Umbraco, there is a lot of documentation available. If you can't find your answers there, feel free to describe your problem in greater detail here, and we will be happy to try and help you out.

  • PCharb 22 posts 42 karma points
    May 19, 2011 @ 20:52
    PCharb
    0

    It is simple, I havea site for somebody who his uploading media and create member, because he manage his site from the web but not with umbraco. What i need to do is to wrote an SQL command that i already have but i need him to pass me the group Id or the user id. How can i connect myself to the DB to be able to get the data that the user want ?

     

  • PCharb 22 posts 42 karma points
    May 19, 2011 @ 20:53
    PCharb
    0

    So what is the command to be able to connect myself to umbraco DB, But from the web site and with Razor, I've try to follow asp.net guideline but nothing work

     

  • PCharb 22 posts 42 karma points
    Jun 17, 2011 @ 21:11
    PCharb
    0

    I only want to open a DB connection with Razor and make a query

  • Daniel Bardi 927 posts 2562 karma points
    Jun 18, 2011 @ 09:25
    Daniel Bardi
    0

    Still not standard practice... I would recommend creating a helper class in an assembly... then call the class from Razor

Please Sign in or register to post replies

Write your reply to:

Draft