locked
vb.net windows mobile 5.0 RRS feed

  • Question

  • hi guys.. i making an application in windows mobile 5.0 in vb.net, if i try to connect the SQL server 2000 i incounter error (can't find PInvoke Dll dbnetlib.dll) here a sample my code,,


    import system.Data
    import system.data.sqlclient
    import system.configuration

    private Connection as new sqlconnection("Data Source=(local);Initial Catalog=OrderDb;Integrated Security =SSPI;")
    private command as sqlcommand

    private Sub openConnection()

    Connection.open( ) ' Error Can't Find PInvoke DLL 'dbnetlib.dll'
    msgbox("Connection Is Open.")
    Connection.close()
    end sub


    thanks...
    • Moved by Zhi-Xin Ye Friday, April 17, 2009 11:45 AM not a BCL question
    Wednesday, April 15, 2009 9:32 AM

Answers

  • Hi,

    The error was probably caused by having not installed the correct SQL Client on the device. Note that this SQL Client is not the same thing as “SQLCE wce5 ARMVI CAB”, because you are accessing a desktop SQL Server rather than SQL CE 

    The SQL Client cabs are located at 
       Program Files\Microsoft Visual Studio 9.0\SmartDevices\SDK\SQL Server\Client\v2.0  

    Find the one for your device according to the CPU type and the OS version. For example, it’s sql.ppc.wce5.armv4i.CAB for Windows Mobile 5/6 Pro.

    Regards,
    Chunsheng Tang


    Please mark the post that helps you, and unmark that does not. This benefits our community members.
    • Marked as answer by warrentang Tuesday, April 21, 2009 1:39 AM
    Monday, April 20, 2009 7:51 AM

All replies

  • Hi,

    The error was probably caused by having not installed the correct SQL Client on the device. Note that this SQL Client is not the same thing as “SQLCE wce5 ARMVI CAB”, because you are accessing a desktop SQL Server rather than SQL CE 

    The SQL Client cabs are located at 
       Program Files\Microsoft Visual Studio 9.0\SmartDevices\SDK\SQL Server\Client\v2.0  

    Find the one for your device according to the CPU type and the OS version. For example, it’s sql.ppc.wce5.armv4i.CAB for Windows Mobile 5/6 Pro.

    Regards,
    Chunsheng Tang


    Please mark the post that helps you, and unmark that does not. This benefits our community members.
    • Marked as answer by warrentang Tuesday, April 21, 2009 1:39 AM
    Monday, April 20, 2009 7:51 AM
  • Hi Mhemher,


    If I am not wrong, You are trying to connect directly to SQL Server 2000 from you mobile. I dont think its possible.

    You have to choose few ways to sync the data to your main databse.

    1) WebService
    2) SQL CE
    3) Use some Server code ( which receives request and update the data to the database and vice versa)

    If my understanding wrong please let us know, your problem more clearly.


    Regards,
    Malleswar
    Monday, April 20, 2009 8:15 AM
  • Hi Malleswar,

    >>If I am not wrong, You are trying to connect directly to SQL Server 2000 from you mobile. I dont think its possible. 

    Yes, it's possible. You can connect to a desktop SQL Server from Windows Mobile. Please read this for more details.
    Please mark the post that helps you, and unmark that does not. This benefits our community members.
    Monday, April 20, 2009 8:38 AM
  • Hi Chunsheng Tang,


    Thank you very much. Its really interesting. I will look into this.


    Regards,
    Malleswar
    Monday, April 20, 2009 8:56 AM
  • Mr. Tang,

    I just got a new PC.

    First thing I installed was Visual Studio 2008 Professional, then updated it with Service Pack 1.

    I went to my data CD and copied over all of my projects. My old projects were all built using Visual Studio 2005, but converted over whenever we get Visual Studio 2008.

    I've installed Management Studio, SQL Server CE 3.5, SQL Server 2008, and the cab files suggested by EricEJ in another post (from folder C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Devices\wce500\armv4i)

    sqlce.dev.ENU.ppc.wce5.armv4i.CAB
    sqlce.ppc.wce5.armv4i.CAB
    sqlce.repl.ppc.wce5.armv4i.CAB

    However, I do not have an SQL Server folder anywhere. What else do I have to do to get the SQL Server Client installed? Does Microsoft still publish it?

    Thanks for the help,
    ~Joe

    Avoid Sears Home Improvement
    Tuesday, October 13, 2009 8:08 PM
  • Please check the following two folders:
     
    Program Files\Microsoft Visual Studio 9.0\SmartDevices\SDK\SQL Server\Client
    Program Files\Microsoft SQL Server Compact Edition\v3.5\Devices\Client\


    Please mark the post that helps you, and unmark that does not. This benefits our community members.
    Wednesday, October 14, 2009 3:20 AM