Click here to Skip to main content
15,887,027 members
Home / Discussions / Database
   

Database

 
QuestionSQL Linq, updating multiple records Pin
jkirkerx15-Jul-15 10:50
professionaljkirkerx15-Jul-15 10:50 
QuestionSave value of PREPARE into a variable Pin
Jassim Rahma14-Jul-15 22:23
Jassim Rahma14-Jul-15 22:23 
AnswerRe: Save value of PREPARE into a variable Pin
Wendelius14-Jul-15 22:45
mentorWendelius14-Jul-15 22:45 
GeneralRe: Save value of PREPARE into a variable Pin
Jassim Rahma15-Jul-15 22:22
Jassim Rahma15-Jul-15 22:22 
GeneralRe: Save value of PREPARE into a variable Pin
Wendelius15-Jul-15 22:51
mentorWendelius15-Jul-15 22:51 
AnswerRe: Save value of PREPARE into a variable Pin
jschell15-Jul-15 10:45
jschell15-Jul-15 10:45 
QuestionSome help with SQL to Linq Conversions Pin
jkirkerx13-Jul-15 7:04
professionaljkirkerx13-Jul-15 7:04 
AnswerRe: Some help with SQL to Linq Conversions Pin
Richard Deeming13-Jul-15 7:18
mveRichard Deeming13-Jul-15 7:18 
GeneralRe: Some help with SQL to Linq Conversions Pin
jkirkerx13-Jul-15 7:34
professionaljkirkerx13-Jul-15 7:34 
General[Got It] Pin
jkirkerx13-Jul-15 7:58
professionaljkirkerx13-Jul-15 7:58 
GeneralRe: Some help with SQL to Linq Conversions Pin
Richard Deeming13-Jul-15 8:00
mveRichard Deeming13-Jul-15 8:00 
QuestionSQL Linq, query and then take result to query again Pin
jkirkerx10-Jul-15 7:43
professionaljkirkerx10-Jul-15 7:43 
Answer[Solved] Pin
jkirkerx10-Jul-15 8:53
professionaljkirkerx10-Jul-15 8:53 
QuestionSELECT then INSERT data in a matrix way Pin
Farhad Eft9-Jul-15 9:14
Farhad Eft9-Jul-15 9:14 
AnswerRe: SELECT then INSERT data in a matrix way Pin
Richard Deeming9-Jul-15 9:22
mveRichard Deeming9-Jul-15 9:22 
GeneralRe: SELECT then INSERT data in a matrix way Pin
Farhad Eft9-Jul-15 10:51
Farhad Eft9-Jul-15 10:51 
QuestionSQL Linq, concepts of writing queries Pin
jkirkerx8-Jul-15 8:55
professionaljkirkerx8-Jul-15 8:55 
AnswerRe: SQL Linq, concepts of writing queries Pin
Richard Deeming8-Jul-15 10:46
mveRichard Deeming8-Jul-15 10:46 
GeneralRe: SQL Linq, concepts of writing queries Pin
jkirkerx8-Jul-15 12:32
professionaljkirkerx8-Jul-15 12:32 
That's Radical Man!

It works like a charm. I figured out that Movies was my Model, and imported the Namespace for it.
So I did some tweaks to get the record selection right, records displayed.

I'm still stuck on using the context, instead of Dimensioning it, but the base of what I project into gets disposed before I can generate the HTML. So that's another subject.

This SQL Linq is quite interesting, and seems to offer everything hand typed queries offer. It's fast.
I'm stoked on my Data Access Layer DLL, Seems to be working. I know the model works now.

If I can convert my asp.net webforms app program over to this, and be able to automatically create a database, and seed it with default values, and then if I change the database in one spot, and I can propagate the changes throughout the program, then I'm done.
All I have to do is adopt the BootStrap CSS Concept used in MVC, and I can sell this thing finally.

Thanks for taking the time to school me on this. I owe you the price of tuition for it. - Street Outlaws

And Here's what I got.
Public Shared Function load_index_array( _
        ByVal pType As MovieType,
        ByVal pSortOrder As SortOrder,
        ByVal pPageIndex As Integer,
        ByVal pPageSize As Integer,
        ByRef pResults As IEnumerable(Of MovieItem)) As Integer

        Dim pValue As Integer = 0

        Dim context As New MoviesContext()
        Dim movies As IQueryable(Of Movies) = context.Movies

        'Sort Order
        Select Case pSortOrder
            Case SortOrder.Name
                movies = movies.OrderBy(Function(m) m.MovieName)
            Case SortOrder.Type
                movies = movies.OrderBy(Function(m) m.MovieType)
            Case SortOrder.Time
                movies = movies.OrderBy(Function(m) m.MovieTime)
            Case SortOrder.Lastest
                movies = movies.OrderByDescending(Function(m) m.MoviePostDate)
            Case SortOrder.Early
                movies = movies.OrderBy(Function(m) m.MoviePostDate)
        End Select

        'Filter By Type
        Select Case pType
            Case MovieType.FLV
                movies = movies.Where(Function(m) m.flv)
            Case MovieType.H264
                movies = movies.Where(Function(m) m.h264)
        End Select

        'Get a Single Page of Data
        If (pPageIndex = 1) Then
            movies = movies.Take(pPageSize)
        Else
            movies = movies.Skip((pPageIndex - 1) * pPageSize).Take(pPageSize)
        End If

        pResults =
            movies.AsEnumerable().Select(Function(item) New MovieItem With
            {
                .MovieID = item.MovieID,
                .MovieName = item.MovieName,
                .MovieType = item.MovieType,
                .MovieDeliveryType = item.MovieDeliveryType,
                .MoviePath = item.MoviePath,
                .MovieUrl = item.MovieURL,
                .MoviePostage = item.MoviePostage,
                .MovieThumbnail = item.MovieThumbnail,
                .MovieLarge = item.MovieLarge,
                .MoviePlaceHolder = item.MoviePlaceHolder,
                .MovieBitRate = item.MovieBitRate,
                .MovieTime = item.MovieTime,
                .MovieSize = item.MovieSize,
                .MovieDescription = item.MovieDescription,
                .MovieCount = item.MovieCount,
                .MovieContributor = item.MovieContributor,
                .MoviePostDate = item.MoviePostDate,
                .MovieIcon = item.MovieIcon,
                .MovieParameters = item.movie_Parameters
        }).AsEnumerable

        pValue = pResults.Count()

        Return pValue

    End Function

Questionssrs rendering format ppt pptx Pin
Aurelkb5-Jul-15 23:35
Aurelkb5-Jul-15 23:35 
AnswerRe: ssrs rendering format ppt pptx Pin
Richard MacCutchan6-Jul-15 0:13
mveRichard MacCutchan6-Jul-15 0:13 
QuestionEvaluate returnvalues of stored procedures used in TableAdapterManager.UpdateAll Pin
atrus27113-Jul-15 1:49
atrus27113-Jul-15 1:49 
AnswerRe: Evaluate returnvalues of stored procedures used in TableAdapterManager.UpdateAll Pin
atrus27113-Jul-15 2:39
atrus27113-Jul-15 2:39 
QuestionOracle Query Builder Pin
Mycroft Holmes30-Jun-15 14:18
professionalMycroft Holmes30-Jun-15 14:18 
AnswerRe: Oracle Query Builder Pin
Jörgen Andersson7-Jul-15 8:40
professionalJörgen Andersson7-Jul-15 8:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.