DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Syrus Guest

    Tom, A Real BIG Thanks


    Tom I dont know how to express my thanks.
    I cant describe it words.
    All that i can write is "Thanks A Lot"

    I wish All the very best for you for your future plans.
    May God shower the ever best possible blessings for you.

    Thanks Thanks.... thanks

    Syrus







    "Tom Wilson" <CyberCyclist@msn.com> wrote:
    >
    >If my previous suggestion didn't work, try setting the Source property to
    >"Select Count(*) as CountRecords from MyTable Where my_code='myValue'"
    >
    >This should only return 1 record with 1 field. That field should have the
    >number of records that conform to the where clause.
    >
    >"Tom Wilson" <CyberCyclist@msn.com> wrote:
    >>
    >>I didn't change the recordset properties.
    >>Try a static, client side recordset.
    >>
    >>>>> Dim Rs as ADODB.Recordset

    >>
    >>>>> Set Rs = New ADODB.Recordset

    >> With Rs
    >> .CursorType = adOpenStatic
    >> .CursorLocation = adClient
    >> Set .ActiveConnection = Conn
    >> .Source = "Select Count(*) from MyTable Where my_code='myValue'"
    >> .Open
    >> end With
    >>
    >>>> If Rs.Fields(0) >= 1 Then
    >>>> MsgBox "This Rec Already exists"
    >>>> End If

    >>
    >>Hope this helps.
    >>
    >>

    >



  2. #2
    MARTIN Guest

    Re: THANKS


    "Michael Miller" <millerassoc@home.com> wrote:
    >A VERY BIG THANK YOU. I WILL HAVE TO WAIT UNTIL TONIGHT TO TRY IT OUT,

    I WILL LET YOU KNOW...THANKS AGAIN

    MARTIN

    >Hi Martin,
    >I currently have an app running on Access97, but I think you only have to
    >choose Jet 4.0 as I have it below. Here is my connection string (all one
    >line):
    >Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\EarlyWarn\Data\EarlWarn.mdb;Mode=ReadWrite|Share
    >Deny None;Persist Security Info=False
    >
    >Also, you can create a .UDL file in the Windows Explorer (file manager)-I
    >have Win98- as follows:
    >1. right click in the right window of the explorer and select New, text

    file.
    >
    >2. Change the name of the file to something that describes the connection
    ><like my app's name Earlwarn.UDL>. If I were to have more than one db,

    then
    >I would probably name it what I am connecting to, like "Access2000Connection.UDL"
    >Be sure to make the extension .UDL
    >
    >3. Then right click the udl file and select Open. It will bring you into
    >a dialog the same as in the properties window of VB. Start with the properties
    >tab and select Jet 4. Then follow the rest of the tabs.
    >
    >4 This makes a special file, similar to an .INI file, that holds your connection
    >string.
    >Put that file in your applications source code path and where you put your
    >.EXE into.
    >Then you then refer to that file, in the App.Path, in your code as:
    >Private Sub Form_Load()
    >
    > 'Make Connection
    > Set cnnADODemographic = New ADODB.Connection
    > cnnADODemographic.ConnectionString = "File Name=" & App.Path & "\" &
    >gcon_strUDLFile
    >'all one line and where I declared gcon_strUDLFile as a constant in my bas
    >module, holding the actual filename (Public Const gcon_strUDLFile As String
    >= "Earlwarn.UDL")
    >'code continues
    > cnnADODemographic.CursorLocation = adUseClient
    > cnnADODemographic.Open
    >
    >HTH,
    >Michael
    >
    >"martin" <clejulmar@altavista.com> wrote:
    >>
    >>I am a sql server user and I have to develop a database application with

    >a
    >>msaccess 2000 database
    >>What is the problem???
    >>Connection string??? Cursor type???? References used???

    >



  3. #3
    Tom Wilson Guest

    Re: Tom, A Real BIG Thanks


    Glad I could help.

    "Syrus" <sanjivus@aol.com> wrote:
    >
    >Tom I dont know how to express my thanks.
    >I cant describe it words.
    >All that i can write is "Thanks A Lot"
    >
    >I wish All the very best for you for your future plans.
    >May God shower the ever best possible blessings for you.
    >
    >Thanks Thanks.... thanks
    >
    >Syrus
    >
    >
    >
    >
    >
    >
    >
    >"Tom Wilson" <CyberCyclist@msn.com> wrote:
    >>
    >>If my previous suggestion didn't work, try setting the Source property

    to
    >>"Select Count(*) as CountRecords from MyTable Where my_code='myValue'"
    >>
    >>This should only return 1 record with 1 field. That field should have

    the
    >>number of records that conform to the where clause.
    >>
    >>"Tom Wilson" <CyberCyclist@msn.com> wrote:
    >>>
    >>>I didn't change the recordset properties.
    >>>Try a static, client side recordset.
    >>>
    >>>>>> Dim Rs as ADODB.Recordset
    >>>
    >>>>>> Set Rs = New ADODB.Recordset
    >>> With Rs
    >>> .CursorType = adOpenStatic
    >>> .CursorLocation = adClient
    >>> Set .ActiveConnection = Conn
    >>> .Source = "Select Count(*) from MyTable Where my_code='myValue'"
    >>> .Open
    >>> end With
    >>>
    >>>>> If Rs.Fields(0) >= 1 Then
    >>>>> MsgBox "This Rec Already exists"
    >>>>> End If
    >>>
    >>>Hope this helps.
    >>>
    >>>

    >>

    >



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links