CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Join Date
    Mar 2009
    Posts
    9

    i have NO IDEA what i'm doing

    Hey everyone!

    Let me start off by saying I am not a programmer whatsoever. We had a group out of Egypt create a program for my office that runs off a MSSQL server. Just recently I had to migrate our server so the name changed. In doing so, our program is now looking at the old server since the connection string is hard-coded in the program. I installed C# 2008 express and went through changing all the connections to look at the new server (using find/replace) and when I click on publish/build/rebuild I get these errors:


    Unable to resolve type 'ComponentFactory.Krypton.Navigator.KryptonNavigator, ComponentFactory.Krypton.Navigator, Version=2.5.1.0, Culture=neutral, PublicKeyToken=token'

    The referenced component 'Microsoft.ReportViewer.Common' could not be found.

    The referenced component 'Microsoft.ReportViewer.WinForms' could not be found.

    The referenced component 'ComponentFactory.KryptonToolkit' could not be found.

    The referenced component 'ComponentFactory.Krypton.Ribbon' could not be found.

    The referenced component 'ComponentFactory.Krypton.Navigator' could not be found.

    Ambiguity between method 'Microsoft.Office.Interop.Word._Application.Quit(ref object, ref object, ref object)' and non-method 'Microsoft.Office.Interop.Word.ApplicationEvents4_Event.Quit'. Using method group.


    I downloaded the 30 day trial of Krypton and installed it just to see if I could publish but it still doesn't work. Just messing around I wound up right clicking on the 'references' folder and chose 'add reference' where I saw the four Krypton references. i chose all but the workspace since it doesn't seem to be needed by the application then chose OK. Yet it isn't working. I also posted this in the ComponentFactory forum for help with the Krypton errors but any help would be amazing.

    Thanks!

    P.S. - there is also a very good chance that this is not in the correct forum. please let me know if this is true!
    Last edited by savesheep; March 30th, 2009 at 10:30 AM.

  2. #2
    Join Date
    Nov 2002
    Location
    .NET 3.5 VS2008
    Posts
    1,039

    Re: i have NO IDEA what i'm doing

    I installed C# 2008 express and went through changing all the connections to look at the new server (using find/replace) and when I click on publish/build/rebuild I get these errors:
    You probably need to give a bit more information about the original codebase. Eg.
    1. What version of the .NET framework was it targetting?
    2. What version of Visual Studio was used?
    3. What 3rd party libraries was it using?
    4. Could you not get the original developers do the update? They might be able to do it for a small fee or as part of a service agreement. Also when they do it tell them that those settings should be available configuration files (i.e. instead of hard coding them).

  3. #3
    Join Date
    Mar 2009
    Posts
    9

    Re: i have NO IDEA what i'm doing

    1. What version of the .NET framework was it targetting?
    2. What version of Visual Studio was used?
    3. What 3rd party libraries was it using?
    4. Could you not get the original developers do the update? They might be able to do it for a small fee or as part of a service agreement. Also when they do it tell them that those settings should be available configuration files (i.e. instead of hard coding them).
    1. I believe it uses 3.5 .NET
    2. visual studio 2005 seems to be the program that was used as its the vb version that references those reportviewer dll's.
    3. it used the krypton toolkit library
    4. the original developers blackmailed us over this project and since they are in egypt, there wasn't much we could do.


    I did find a hotfix to download the two MS dll's that I needed to reference. I also found the old install of krypton toolkit 2.5.1.0 which was used for development. I installed both of them went back to that 'add reference' window and they are all there but don't do anything when i choose 'add'.

    Thanks!!

  4. #4
    Join Date
    Nov 2002
    Location
    .NET 3.5 VS2008
    Posts
    1,039

    Re: i have NO IDEA what i'm doing

    Hi,

    Is this a big application? I suggest you upload the entire codebase and any 3rd party libraries. People (myself included) might be willing to at least it get it build without any errors.

  5. #5
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: i have NO IDEA what i'm doing

    Quote Originally Posted by savesheep View Post
    ...I installed both of them went back to that 'add reference' window and they are all there but don't do anything when i choose 'add'.
    I think this are dlls. Have you only copied the files to the new machine or did you also register them using regsvr32.exe ? IMHO you need to register them and they should be done to windows\system32
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  6. #6
    Join Date
    Mar 2009
    Posts
    9

    Re: i have NO IDEA what i'm doing

    Hey Nelo,

    Thanks for your response. The program when rar'd is about 30MB. The reason we have to rebuild it is the server has changed so a few references to server2 in the program need to be changed to mail for it to connect.

    Since the program has all our server info/passwords/etc in it, i'm just a hair bit reluctant in putting it out there for someone else to build.

    However, if you're up to it, I wouldn't mind sending it to just one person to attempt it. I'll PM you if you'd like.

    On the flip side - I would like to learn a little bit myself so if there is any way you can point me in the general direction that would be fantastic!

    I just installed visual studio 2008 and I'm trying to find a disc for 2005 just in case.

  7. #7
    Join Date
    Mar 2009
    Posts
    9

    Re: i have NO IDEA what i'm doing

    @JohnnyPoet:

    i have not registered them yet - i assumed in command prompt i'll just browse to the folder where the dll's are located and do a 'regsvr32 file.dll' is that right?

    Thanks!

  8. #8
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: i have NO IDEA what i'm doing

    Quote Originally Posted by savesheep View Post
    @JohnnyPoet:

    i have not registered them yet - i assumed in command prompt i'll just browse to the folder where the dll's are located and do a 'regsvr32 file.dll' is that right?

    Thanks!
    Best way is copying all the dlls to windws\system32 and then you can do as you wrote above. You will get a message about succeeding or if not, what has failed
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  9. #9
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: i have NO IDEA what i'm doing

    Quote Originally Posted by savesheep View Post

    I just installed visual studio 2008 and I'm trying to find a disc for 2005 just in case.
    2008 can do all what 2005 could and just a bit more.
    Is the program written in C# ? If you are not sure just show 10 lines of code anywhere in the program and IMHO we are able to tell you if it is C#or whatever.

    When you tried to reference to the dlls what happened exactly. you opened the reference section of the program and searched for the dlls, and then? Have they beed added ? maybe you first need to delete old broken entries to that dlls or you can find copies of the dlls in the bin\debug or bin\release section of your code.

    I'm not sure but maybe MS ReportViewer is part of Crystal Reports.?
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  10. #10
    Join Date
    Mar 2009
    Posts
    9

    Re: i have NO IDEA what i'm doing

    Code:
     string[] Favourites = Estimate.QueryDataBase("SELECT FolderName from tblFavourites", "FolderName");
                foreach (string fav in Favourites)
                {
                    if (!lstFav.Items.Contains(fav))
                        lstFav.Items.Add(fav);
                }
                app.Quit(ref Missing, ref Missing, ref Missing);
    
            }
    
            private void kryptonPage4_Click(object sender, EventArgs e)
            {
                GetRecentDocs();
            }
    
            private void lstFavourites_Click(object sender, EventArgs e)
            {
                GetRecentDocs();
    I've narrowed it down to c# because i tried to open it in all the other versions of visual studio and none could view it, haha.

    It doesn't seem that ReportViewer is part of crystal reports - see here:
    http://support.microsoft.com/kb/933137

    Right now I only get one error. I removed the other three krypton references and now I just have the ambiguity error.

    Thanks!

  11. #11
    Join Date
    Mar 2009
    Posts
    9

    Re: i have NO IDEA what i'm doing

    Okay - I just re-added those three krypton dll's and now they work. Same with the other references. So it seems they had to be removed and re-referenced in order for the system to 'click'.

  12. #12
    Join Date
    Mar 2009
    Posts
    9

    Re: i have NO IDEA what i'm doing

    Code:
            private void GetRecentDocs()
            {
                Microsoft.Office.Interop.Word.Application app = new ApplicationClass();
                app.Visible = false;
                for (int i = 1; i < app.RecentFiles.Count; i++)
                {
                    string temp = app.RecentFiles[i].Path + @"\" + app.RecentFiles[i].Name;
                    if (temp.Contains(Program.JobFolderPath))
                        lstRecent.Items.Add(temp);
                }
    
                string[] Favourites = Estimate.QueryDataBase("SELECT FolderName from tblFavourites", "FolderName");
                foreach (string fav in Favourites)
                {
                    if (!lstFav.Items.Contains(fav))
                        lstFav.Items.Add(fav);
                }
                app.Quit(ref Missing, ref Missing, ref Missing);
    
            }
    the error is in that last line. app.Quit

  13. #13
    Join Date
    Nov 2002
    Location
    .NET 3.5 VS2008
    Posts
    1,039

    Re: i have NO IDEA what i'm doing

    Quote Originally Posted by savesheep
    the error is in that last line. app.Quit
    What's the actual error?

  14. #14
    Join Date
    Mar 2009
    Posts
    9

    Re: i have NO IDEA what i'm doing

    Hey Guys,

    I actually got the program to successfully build last night. My only issue now is making it talk to the MSSQL server.

    I've gone into the surface area configuration tool to enable remote connections via both tcp/ip and named pipes. I've started the SQL Browser as well.

    I also logged into SQL Server Configuration Manager to make sure everything is enabled. In here I enabled the VIA under protocols for SQL Server 2005 Network Connections.

    The firewall is disabled on this machine. My program will not connect to the mssql database as i'm getting the error saying connection refused.

    "A network-related or instance-specific error occurred while establishing a connection to SQL Server. THe server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections."

    SOO for some reason I can't connect to it. When I run netstat -a on the server I get hundreds of pages so I can't exactly see if port 1433 is listening. Is there another way to check? Is there a program I can download that specifically tests connections to MSSQL?

    Last but not least - I have configured the router to push port 1433 to the local IP of the server.

    When I telnet to the SBS 2008 machine on port 1433 it says it isn't open.

    Thanks again!

  15. #15
    Join Date
    Nov 2002
    Location
    .NET 3.5 VS2008
    Posts
    1,039

    Re: i have NO IDEA what i'm doing

    Hi,

    Have you been able to double-check the connection string? There may be a problem there. Is it targetting the right database server instance and database name? Does it have the right credentials?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured