7 Replies - 1923 Views - Last Post: 02 September 2010 - 11:29 AM Rate Topic: -----

#1 mpe-IT  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 152
  • Joined: 27-November 09

I need help for my thesis

Posted 01 September 2010 - 05:10 AM

im using visual studio 2008 professional as front-end and Sql server 2008 R2 as back-end.

i started making our system last week. as of now the login system is done. im now working on add,edit,delete,update of users who can login on the system. on my desktop(windows xp) when i click system users form(intend to add,edit,delete,update users), it runs well without any problem. the problem is that when i try it on my netbook(windows 7) and i click the form system users, these problem shows

Posted Image

everything is working fine in our desktop windows xp, what am i missing on my netbook(win 7)???


here is the code located on form load of SystemUsers

 Private Sub SystemUsers_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        cmdCancelUser.Enabled = False
        cmdSaveUser.Enabled = False

        loginCon.ConnectionString = ("Data Source=.;AttachDbFilename=C:\Documents and Settings\Estipona Family\My Documents\Visual Studio 2008\Projects\Blotter System for Pasay City Police\Blotter System for Pasay City Police\database\loginDB.mdf;Integrated Security=True;User Instance=True")
        sql = "SELECT Username,Password FROM tblUsers"

        loginCon.Open()
        loginAdptr = New SqlClient.SqlDataAdapter(sql, loginCon)
        loginAdptr.Fill(loginDs, "loginDB")
        navigateRecords()
        maxrows = loginDs.Tables("loginDB").Rows.Count
    End Sub


Is This A Good Question/Topic? 0
  • +

Replies To: I need help for my thesis

#2 Bort  Icon User is offline

  • Ill-informed Mongoloid
  • member icon

Reputation: 450
  • View blog
  • Posts: 3,114
  • Joined: 18-September 06

Re: I need help for my thesis

Posted 01 September 2010 - 06:37 AM

As it all works fine under WinXP, but not Win7, my first though is that is could have something to do with the permissions setup in Win7. Have you tried running it as an administrator?
Was This Post Helpful? 0
  • +
  • -

#3 mpe-IT  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 152
  • Joined: 27-November 09

Re: I need help for my thesis

Posted 01 September 2010 - 06:55 AM

Yes, I even run it using Admin account in win 7
Was This Post Helpful? 0
  • +
  • -

#4 CharlieMay  Icon User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1726
  • View blog
  • Posts: 5,704
  • Joined: 25-September 09

Re: I need help for my thesis

Posted 01 September 2010 - 07:05 AM

I found this on a google search. Hopefully it helps

Quote

The solution is simple... just right click the App_Data folder in Windows Explorer, go to the Security tab, click the "Advanced" button, click "Change permissions", select the option to propagate changes to children objects and click "Apply".


Here's a link to where I found it.

I know your file is not residing in the app_data directory but thought it might be relevant to your file location.

This post has been edited by CharlieMay: 01 September 2010 - 07:06 AM

Was This Post Helpful? 0
  • +
  • -

#5 emresutisna  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 21
  • View blog
  • Posts: 80
  • Joined: 14-May 09

Re: I need help for my thesis

Posted 01 September 2010 - 10:42 PM

View Postmpe-IT, on 01 September 2010 - 04:10 AM, said:

im using visual studio 2008 professional as front-end and Sql server 2008 R2 as back-end.

i started making our system last week. as of now the login system is done. im now working on add,edit,delete,update of users who can login on the system. on my desktop(windows xp) when i click system users form(intend to add,edit,delete,update users), it runs well without any problem. the problem is that when i try it on my netbook(windows 7) and i click the form system users, these problem shows

Posted Image

everything is working fine in our desktop windows xp, what am i missing on my netbook(win 7)???


here is the code located on form load of SystemUsers

 Private Sub SystemUsers_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        cmdCancelUser.Enabled = False
        cmdSaveUser.Enabled = False

        loginCon.ConnectionString = ("Data Source=.;AttachDbFilename=C:\Documents and Settings\Estipona Family\My Documents\Visual Studio 2008\Projects\Blotter System for Pasay City Police\Blotter System for Pasay City Police\database\loginDB.mdf;Integrated Security=True;User Instance=True")
        sql = "SELECT Username,Password FROM tblUsers"

        loginCon.Open()
        loginAdptr = New SqlClient.SqlDataAdapter(sql, loginCon)
        loginAdptr.Fill(loginDs, "loginDB")
        navigateRecords()
        maxrows = loginDs.Tables("loginDB").Rows.Count
    End Sub


Try to replace "loginCon.ConnectionString" value with this one :
loginCon.ConnectionString = "Data Source= localhost; Database = loginDB; Integrated Security=True"



I thought you don't have the authority to access the database File directly.
Was This Post Helpful? 0
  • +
  • -

#6 motcom  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 293
  • View blog
  • Posts: 1,371
  • Joined: 16-June 08

Re: I need help for my thesis

Posted 02 September 2010 - 04:34 AM

Check what the error says, "a database with the same name already exists" (that might be the problem, most lightly, open SQL Server Management Studio and see if there is already a database with that name.)

The other one is "specified file can not be opened" (can be lots of reasons, try moving the file to a folder like "C:\Database" if on a windows 7 machine, consider file sharing for that folder to [if it does not work without it])

the next error is the "UNC Share" (some thing like "\\server1\folder1\...", wich it is not in your case)
Was This Post Helpful? 0
  • +
  • -

#7 parbipin  Icon User is offline

  • D.I.C Head

Reputation: 29
  • View blog
  • Posts: 95
  • Joined: 23-August 10

Re: I need help for my thesis

Posted 02 September 2010 - 07:05 AM

TO add to what motcom suggested;
This can also be a problem caused by the UAC feature of Windows 7. So even though you login as an administrator the apps still run as a normal user that can restrict access to the databases to which only administrator has an access.

You can try to right click you application and then Run As Administrator.

Hope it helps!!!
Was This Post Helpful? 0
  • +
  • -

#8 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon

Reputation: 2298
  • View blog
  • Posts: 9,535
  • Joined: 29-May 08

Re: I need help for my thesis

Posted 02 September 2010 - 11:29 AM

SQL Exprees requires admin permissions, I know there is a version that doesn't.

That was release within the last couple of months, typically I can not find.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1