NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 54 55 56 57 58 … 93 Next »
How to use MSDE(SQL Server) as GBPVR Database

 
  • 0 Vote(s) - 0 Average
How to use MSDE(SQL Server) as GBPVR Database
cginzel
Offline

Member

Posts: 192
Threads: 22
Joined: Dec 2004
#31
2004-12-21, 04:35 AM
Okay KingArgyle,

I finally figured out what I was doing wrong in the MSDE install... I was including the quotes around the password as shown in the MSDE setup instructions! [Image: tounge.gif]

Note to anyone doing install, used SAPSW=password without quotes around the password!

Here are the grants I used for all of the tables (I'm using gbpvr for the user id as suggested by KingArgyle):

GRANT SELECT, INSERT, UPDATE, DELETE ON CAPTURE_SOURCE TO gbpvr
GO
GRANT SELECT, INSERT, UPDATE, DELETE ON CHANNEL TO gbpvr
GO
GRANT SELECT, INSERT, UPDATE, DELETE ON CUSTOM_TASK_SETTINGS TO gbpvr
GO
GRANT SELECT, INSERT, UPDATE, DELETE ON DIRECT_RECORDING_SOURCE TO gbpvr
GO
GRANT SELECT, INSERT, UPDATE, DELETE ON EXE_CHANNEL_CHANGER TO gbpvr
GO
GRANT SELECT, INSERT, UPDATE, DELETE ON GIRDER_CHANNEL_CHANGER TO gbpvr
GO
GRANT SELECT, INSERT, UPDATE, DELETE ON GO7007SB_RECORDING_SOURCE TO gbpvr
GO
GRANT SELECT, INSERT, UPDATE, DELETE ON IR200L_CHANNEL_CHANGER TO gbpvr
GO
GRANT SELECT, INSERT, UPDATE, DELETE ON LIVETV_FILE TO gbpvr
GO
GRANT SELECT, INSERT, UPDATE, DELETE ON PLAYBACK_POSITION TO gbpvr
GO
GRANT SELECT, INSERT, UPDATE, DELETE ON PROGRAMME TO gbpvr
GO
GRANT SELECT, INSERT, UPDATE, DELETE ON RECORDING_SCHEDULE TO gbpvr
GO
GRANT SELECT, INSERT, UPDATE, DELETE ON RECORD_SEASON TO gbpvr
GO
GRANT SELECT, INSERT, UPDATE, DELETE ON REDRAT_CHANNEL_CHANGER TO gbpvr
GO
GRANT SELECT, INSERT, UPDATE, DELETE ON SOURCE_CHANNEL_MAPPING TO gbpvr
GO
GRANT SELECT, INSERT, UPDATE, DELETE ON USBUIRT_CHANNEL_CHANGER TO gbpvr
GO
GRANT SELECT, INSERT, UPDATE, DELETE ON WINTV_CAP_SOURCE TO gbpvr
GO
GRANT SELECT, INSERT, UPDATE, DELETE ON XMLTV_EPGSOURCE TO gbpvr
GO
GRANT SELECT, INSERT, UPDATE, DELETE ON ZAP2IT_EPGSOURCE TO gbpvr
GO

However...  [Image: smile.gif]

I use Zap2It data and at the very end of the EPG Update, I get the following error...

"Failure in ChanneFactory:ConfusedtoreChannels(): Specified cast is not valid."

And off course there are no channels displayed after this...  [Image: sad.gif]

So KingArgyle, there must be an error in one of the Access type conversions...

I'm running GBPVR v0.23.13.

I ran your last set of scripts; I'm guessing one or the other of these tables are at fault...

CREATE TABLE [ZAP2IT_EPGSOURCE] (
[capture_source_oid] [int] NOT NULL ,
[username] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[password] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[add_offset] [int] NULL
) ON [PRIMARY]
GO


CREATE TABLE [CHANNEL] (
[oid] [int] IDENTITY (1, 1) NOT NULL ,
[name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[channelID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[channel_number] [int] NULL ,
[favourite] [bit] NOT NULL
) ON [PRIMARY]
GO

Note: there is only one row in the CHANNEL table and no rows in the ZAP2IT_EPGSOURCE

Any suggestions are welcome...

-Charles
[SIZE="1"]NextPVR v2.3.4 on XP Home SP2
Rig: Dual Core P4 2.8GHz, 3GB Ram + 230GB HD
Media: WinTV PVR-150/MCE (2) + Media MVP 1000 (1) vD3A
Tools/Plug-ins: Weather, ComSkip, NEWA[/SIZE]
cginzel
Offline

Member

Posts: 192
Threads: 22
Joined: Dec 2004
#32
2004-12-21, 04:47 AM
Here is a snippet from cofig.exe.log:

12/20/2004 10:36:38 PM.031 INFO [241] Auto-Updating EPG
12/20/2004 10:36:38 PM.031 VERBOSE [241] FindLastListingDate() oid: 1
12/20/2004 10:36:38 PM.031 INFO [241] Requesting listings for period: 2004-12-20T00:00:00Z - 2004-12-28T00:00:00Z
12/20/2004 10:39:54 PM.078 VERBOSE [241] EPGUpdate storeChannels()
12/20/2004 10:39:54 PM.078 VERBOSE [241] getValue cached value: /settings/EPGProcessingMode : NORMAL
12/20/2004 10:39:54 PM.078 VERBOSE [241] getValue cached value: /settings/EPGProcessingMode : NORMAL
12/20/2004 10:39:54 PM.125 WARNING [241] Unexpected error removing old shows from EPG: Line 1: Incorrect syntax near 'p'.
12/20/2004 10:39:54 PM.218 ERROR [241] Failure in ChannelFactory:ConfusedtoreChannels(): Specified cast is not valid.
12/20/2004 10:39:54 PM.218 ERROR [241] Failure in ChannelFactory:ConfusedtoreChannels(): at a2.a(ICollection A_0, Int32 A_1)
12/20/2004 10:39:56 PM.500 VERBOSE [241] RecordingFactory.loadSchedule()

It almost looks like another Zap2It parsing problem, but when I switch back to using the access db connection, I can update the EPG with no problems... [Image: sad.gif]
[SIZE="1"]NextPVR v2.3.4 on XP Home SP2
Rig: Dual Core P4 2.8GHz, 3GB Ram + 230GB HD
Media: WinTV PVR-150/MCE (2) + Media MVP 1000 (1) vD3A
Tools/Plug-ins: Weather, ComSkip, NEWA[/SIZE]
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#33
2004-12-21, 04:58 AM
Check your SOURCE_CHANNEL_MAPPING table, I believe that is where the error is. I was getting the same error with .2313, and I had to change the nvarchar datatypes to varchar datatypes in this table and the Channels table.

Here is my table:
CREATE TABLE [dbo].[SOURCE_CHANNEL_MAPPING] (
[oid] [int] IDENTITY (1, 1) NOT NULL ,
[channel_oid] [int] NULL ,
[capture_source_oid] [int] NULL ,
[source_channel_number] [int] NULL ,
[enabled] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO

The is is the Enabled field, is initally set to nvarchar, when it needs to be at least a varchar, probably should just be a char field as it is pointless to have a 1 character varchar field.

Once that is done, you should be able to run the Episode Guide update from the Config application or when the recording service runs it at 3am. The error message is kinda of misleading as to what the source of the problem is. It appears that after loading the program information, the source channel mappings are updated to make sure no new channels were added to the lineup since the guide was last downloaded.



cginzel
Offline

Member

Posts: 192
Threads: 22
Joined: Dec 2004
#34
2004-12-21, 02:04 PM
My table matches your table def...

Based on what you were saying I changed the nvarchar in ZAP2IT_EPGSOURCE like so...

CREATE TABLE [ZAP2IT_EPGSOURCE] (
[capture_source_oid] [int] NOT NULL ,
[username] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[password] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[add_offset] [int] NULL
) ON [PRIMARY]
GO

but that didn't fix it either...

Are using Zap2It for your TV listing?

-Charles



[SIZE="1"]NextPVR v2.3.4 on XP Home SP2
Rig: Dual Core P4 2.8GHz, 3GB Ram + 230GB HD
Media: WinTV PVR-150/MCE (2) + Media MVP 1000 (1) vD3A
Tools/Plug-ins: Weather, ComSkip, NEWA[/SIZE]
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#35
2004-12-21, 02:16 PM
Yeah, on my Development machine, I'm using MSDE and the Zap2It episode guide. I tested the import last night, and it worked fine.

Send me an email, and I'll get you a stripped down version of the database tonight. Mount it and see if you can get my version working. You might have to change the Source_Channel_Mappings.

You could also delete all your data from the MSDE gbpvr, and create a DTS package, to migrate the data from your Access database, to the MSDE database. Once it is repopulated, rerun the Zap2It episode guide import.

The only tables I touched to get it to work were Channel, and Source_Channel_Mapping.



KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#36
2004-12-21, 02:31 PM
Here are also a couple of links in regards to datatype differences between Access and SQL Server:

http://www.schemamania.org/jkl/booksonli...005_64.htm

http://www.databasejournal.com/features/...hp/1490561
cginzel
Offline

Member

Posts: 192
Threads: 22
Joined: Dec 2004
#37
2004-12-21, 03:36 PM
Thanks KingArgyle, I'll give the DTS a try when I get home and see how that goes...

-Charles
[SIZE="1"]NextPVR v2.3.4 on XP Home SP2
Rig: Dual Core P4 2.8GHz, 3GB Ram + 230GB HD
Media: WinTV PVR-150/MCE (2) + Media MVP 1000 (1) vD3A
Tools/Plug-ins: Weather, ComSkip, NEWA[/SIZE]
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#38
2004-12-21, 03:48 PM
If you use DTS, use the Bulk Data Copy method to copy the table data over. If you use the Transform methods, you'll have to get the order correct when loading the data because of the constraints. Easiest way to do this, is to just run the Import Data wizard, and it'll set it up for you.

I suspect a Identity column is not matching up, and causing the storechannel to fail.
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#39
2004-12-22, 03:42 AM
One more interesting twist I discovered tonight. Apparently sub is using the Access 2000 Now() function when scheduling season recordings. The equivalnt to this is getdate(). However, since the sql he is using is hard coded there isn't an easy way to change this. The result is that it doesn't appear that any Season recordings are getting rescheduled. I haven't totally verified this yet, but the logs show an error occuring when trying to schedule season recordings.

I'm working on an external scheduler that can be run alongside the GBPVR scheduler. This should make sure that season recordings happen regardless.

This is the one thing I don't like about Databases and SQL. Core language the databases are syntax compatible, but start adding functions, and you get a incompatiblities moving sql from one database to another.
cginzel
Offline

Member

Posts: 192
Threads: 22
Joined: Dec 2004
#40
2004-12-22, 04:32 PM
My first thought was to wrap getdate() inside of a function called now(), but getdate() is non-deterministic and therefore cannot be used inside of a function...

i.e. this doesn't compile:

CREATE FUNCTION dbo.Now() RETURNS datetime
AS
BEGIN
DECLARE @current_dt datetime
SELECT @current_dt = getdate()
RETURN @current_dt
END
[SIZE="1"]NextPVR v2.3.4 on XP Home SP2
Rig: Dual Core P4 2.8GHz, 3GB Ram + 230GB HD
Media: WinTV PVR-150/MCE (2) + Media MVP 1000 (1) vD3A
Tools/Plug-ins: Weather, ComSkip, NEWA[/SIZE]
« Next Oldest | Next Newest »

Users browsing this thread: 2 Guest(s)

Pages (15): « Previous 1 2 3 4 5 6 … 15 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  Determine Server Tuner/Recorder Status from Console App 27InchSony 13 8,293 2016-12-21, 05:03 AM
Last Post: mvallevand
  Looking for C# UPnP Media Server code bgowland 5 7,647 2016-12-16, 08:25 PM
Last Post: mvallevand
  TitanTv Remote Schedule For GBPVR UncleJohnsBand 51 33,728 2015-08-20, 05:11 PM
Last Post: sub
  Delete recordings from database but not from disk? spinnaker 8 3,826 2013-10-26, 10:51 PM
Last Post: spinnaker
  trying to fake npvr database for unit tests reven 3 2,266 2013-05-20, 08:53 AM
Last Post: reven
  Roku & GBPVR pvruser 16 11,523 2011-10-16, 08:31 PM
Last Post: pvruser
  (Yet Another) Rename Helper script for GBPVR & NPVR pvruser 2 2,733 2011-07-22, 01:27 AM
Last Post: pvruser
  Merged database queries mvallevand 4 2,091 2011-06-26, 09:56 PM
Last Post: mvallevand
  NPVR database questions mvallevand 25 9,875 2011-01-06, 12:58 AM
Last Post: jksmurf
  NPVR database - why so stringy with the fields?? :0) carpeVideo 4 2,039 2010-09-21, 01:48 AM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode