Search Results

Search found 11 results on 1 pages for 'amrosh'.

Page 1/1 | 1 

  • System.MissingMemberException was unhandled by user code

    - by AmRoSH
    I'm using this code: Dim VehiclesTable1 = dsVehicleList.Tables(0) Dim VT1 = (From d In VehiclesTable1.AsEnumerable _ Select VehicleTypeName = d.Item("VehicleTypeName") _ , VTypeID = d.Item("VTypeID") _ , ImageURL = d.Item("ImageURL") _ , DailyRate = d.Item("DailyRate") _ , RateID = d.Item("RateID")).Distinct its linq to dataset and I Take Data on THis Rotator: <telerik:RadRotator ID="RadRotatorVehicleType" runat="server" Width="620px" Height="145" ItemWidth="155" ItemHeight="145" ScrollDirection="Left" FrameDuration="1" RotatorType="Buttons"> <ItemTemplate> <div style="text-align: center; cursor: pointer; width: 150px"> <asp:Image ID="ImageVehicleType" runat="server" Width="150" ImageUrl='<%# Container.DataItem("ImageURL") %>' /> <asp:Label ID="lblVehicleType" runat="server" Text='<%# Container.DataItem("VehicleTypeName") %>' Font-Bold="true"></asp:Label> <br /> <asp:Label ID="lblDailyRate" runat="server" Text='<%# Container.DataItem("DailyRate") %>' Visible="False"></asp:Label> <input id="HiddenVehicleTypeID" type="hidden" value='<%# Container.DataItem("VTypeID") %>' name="HiddenVehicleTypeID" runat="server" /> <input id="HiddenRateID" type="hidden" value='<%# Container.DataItem("RateID") %>' name="HiddenRateID" runat="server" /> </div> </ItemTemplate> <ControlButtons LeftButtonID="img_left" RightButtonID="img_right" /> </telerik:RadRotator> and I got this Exception: No default member found for type 'VB$AnonymousType_0(Of Object,Object,Object,Object,Object)'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.MissingMemberException: No default member found for type 'VB$AnonymousType_0(Of Object,Object,Object,Object,Object)'. I don't know whats up ? Any help please. Thanks for who tried to solve this but I got solution: using '<%# DataBinder.Eval(Container.DataItem,"ImageURL") %>' instead of '<%# Container.DataItem("RateID") %>' Thanks,

    Read the article

  • sql server swap data between rows problem

    - by AmRoSH
    I was asking b4 about swaping query to swap data between rows in same table and i got that qurey ALTER PROCEDURE [dbo].[VehicleReservationsSwap] -- Add the parameters for the stored procedure here (@FirstVehicleID int, @secondVehicleID int, @WhereClause nvarchar(2000)) AS BEGIN Create Table #Temp ( VehicleID int ,VehicleType nvarchar(100) ,JoinId int ) DECLARE @SQL varchar(8000) SET @SQL ='Insert into #Temp (VehicleID,VehicleType,JoinId) SELECT VehicleID,VehicleType,CASE WHEN VehicleID = ' + Cast(@FirstVehicleID as varchar(10)) + ' then ' + Cast(@secondVehicleID as varchar(10)) + ' ELSE ' + Cast(@FirstVehicleID as varchar(10)) + ' END AS JoinId FROM Reservations WHERE VehicleID in ( ' + Cast(@FirstVehicleID as varchar(10)) + ' , ' + Cast(@secondVehicleID as varchar(10)) + ' )' + @WhereClause EXEC(@SQL) --swap values UPDATE y SET y.VehicleID = #Temp.VehicleID ,y.VehicleType = #Temp.VehicleType FROM Reservations y INNER JOIN #Temp ON y.VehicleID = #Temp.JoinId WHERE y.VehicleID in (@FirstVehicleID,@secondVehicleID) Drop Table #Temp END this query take 2 parameters and swaping all rows returned for each parameter. the problem is the query swaps just if each parameter (forign key) has values I need to make swaping in case if one of them has no vlue. I hope if some one can help me in that . Thanks,

    Read the article

  • Using current database name in T-SQL has Using statement

    - by AmRoSH
    Hello everybody. I have application runs T-SQL statements to update more than one database the problem is i'm using the following t-sql USE [msdb] GO DECLARE @jobId BINARY(16) EXEC msdb.dbo.sp_add_job @job_name=N'test2', @enabled=1, @start_step_id=1, @notify_level_eventlog=0, @notify_level_email=2, @notify_level_netsend=2, @notify_level_page=2, @delete_level=0, @description=N'', @category_name=N'[Uncategorized (Local)]', @owner_login_name=N'sa', @notify_email_operator_name=N'', @notify_netsend_operator_name=N'', @notify_page_operator_name=N'', @job_id = @jobId OUTPUT select @jobId GO EXEC msdb.dbo.sp_add_jobserver @job_name=N'test2', @server_name = N'AMR-PC\SQL2008' GO USE [msdb] GO EXEC msdb.dbo.sp_add_jobstep @job_name=N'test2', @step_name=N'test', @step_id=1, @cmdexec_success_code=0, @on_success_action=1, @on_fail_action=2, @retry_attempts=0, @retry_interval=0, @os_run_priority=0, @subsystem=N'TSQL', @command=N'EXEC sp_MSforeachdb '' EXEC sp_MSforeachtable @command1=''''DBCC DBREINDEX (''''''''*'''''''')'''', @replacechar=''''*''''''', @database_name=N'Client5281', @output_file_name=N'C:\Documents and Settings\Amr\Desktop\Scheduel Reports\report', @flags=2 GO USE [msdb] GO DECLARE @schedule_id int EXEC msdb.dbo.sp_add_jobschedule @job_name=N'test2', @name=N'test', @enabled=1, @freq_type=8, @freq_interval=1, @freq_subday_type=1, @freq_subday_interval=0, @freq_relative_interval=0, @freq_recurrence_factor=1, @active_start_date=20100517, @active_end_date=99991231, @active_start_time=0, @active_end_time=235959, @schedule_id = @schedule_id OUTPUT select @schedule_id GO and i'm using (USE [msdb]) before any block and i want to get database name to replace this @database_name=N'**Client5281**', with the current database name instead of ([msdb]) that i'm using. i hope that i explained what i want well.

    Read the article

  • Swap values for two rows in the same table in SQL Server

    - by AmRoSH
    I have table and I want to swap the values from two rows. I have the rows IDs of the two rows. Is there any query to do that? Here is an example. Before the query I have this: row1 : 1,2,3 row2 : 5,6,7 After the swap I want this: row1 : 5,6,7 row2 : 1,2,3 I don't want write it in .NET code because I think an SQL query is easier than that.

    Read the article

  • weekly Automatic running sql server script

    - by AmRoSH
    I have sql server script and i want to automatic run it on the database every week. any help. i tried sql server agent job but i have alot of data bases on my server and i should make step to every database and it will run in the same day and same time.

    Read the article

  • get index name within specific table name

    - by AmRoSH
    I need to check if this index not exist in specific table name not in all tables because this select statement select all indexes under this condition. IF NOT EXISTS (SELECT name from sysindexes WHERE name = 'IDX_InsuranceID') CREATE NONCLUSTERED INDEX [IDX_InsuranceID] ON [dbo].[QuoteInsurances] ( [InsuranceID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY] GO Thanks,

    Read the article

1