Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 45

Thread: SQL 101

  1. #11

    Default Re: SQL 101


    @kyle sorry i misread mssql as mysql however i think its the same situation.
    i believe all you need is to change your provider string to connect to MSSql.

    Set cnn = New ADODB.Connection

    ' Open a connection by referencing the ODBC driver.
    cnn.ConnectionString = "driver={SQL Server};" & _
    "server=;uid=;pwd=;database="
    cnn.Open

    thanks also

  2. #12

    Default Re: SQL 101

    kyle_nexus...

    create a blank form and insert the ADODC control. After dragging or inserting, right click your ADODC and then go to properties. From there you can create new connections of your choice.

  3. #13

    Default Re: SQL 101

    Set conn = New ADODB.Connection
    conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=" & App.Path & "\MLMdata.mdb"
    conn.Open

    -------> by the way, unsaon pagbutang og Password sa kana na connection string

    sa inyo bay, asa man ok.. ang object jud na ADODC or just using connection string

    talking about SQL..

    unsa man ng MySQL?? server jud na siya?? coz i havent tried man gud.. i do sql script peru sa MSaccess SQL ra.. unsa man ang kalahian?? diba naa may MySql server??

  4. #14

    Default Re: SQL 101

    Quote Originally Posted by nunobone
    Set conn = New ADODB.Connection
    conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=" & App.Path & "\MLMdata.mdb"
    conn.Open

    -------> by the way, unsaon pagbutang og Password sa kana na connection string

    sa inyo bay, asa man ok.. ang object jud na ADODC or just using connection string

    talking about SQL..

    unsa man ng MySQL?? server jud na siya?? coz i havent tried man gud.. i do sql script peru sa MSaccess SQL ra.. unsa man ang kalahian?? diba naa may MySql server??
    I usually use the connection string since it is more versatile. All you need to do is change you SQL statement text string to query or extract data. ADO is also ok except that you have to put the ocx object in your form which means it loads more bytes or capacity bad for optimization specially you are connecting to a server.

    for your question on how to put the password on the connection string just ff below sample
    check the UID as your username and PWD as your password

    Open a connection by referencing the ODBC driver.
    cnn.ConnectionString = "driver={SQL Server};" & _
    "server=;uid=;pwd=;database="
    cnn.Open





  5. #15

    Default Re: SQL 101

    thanks guys. i've found a way to deal with the correct connection strings.

    thanks to this site...

    http://www.codeproject.com/database/...p#Sql%20Server

    =============================================
    Private Sub Command1_Click()
    Dim cn As ADODB.Connection
    Dim rsSample As ADODB.Recordset

    Set cn = New ADODB.Connection
    Set rsSample = New ADODB.Recordset

    Let cn.ConnectionString = "Driver={SQL Server};" & _
    "Server=NEXUSERV;" & _
    "Database=dbtest;" & _
    "Trusted_Connection=yes"
    cn.Open


    If cn.State = adStateOpen Then
    MsgBox "The Connection is now open!"
    Else
    MsgBox "Sorry. The connection could not be opened."
    End If

    End Sub
    =============================================

    no need to specify username and password since ill be using Microsoft WinNT Authentication Mode to authorize user access to the SQL Server database.

  6. #16

    Default Re: SQL 101

    returns number of rows
    select count(*) from emp

  7. #17

    Default Re: SQL 101

    kinsa may nakatry na ug connect C++.NET ug mysql?

  8. #18

    Default Re: SQL 101

    select cc.* from credit_cards cc, credit_limit cl where cl.owner_id=cc.owner_id and cl.credit_limit > 1000000

  9. #19

    Default Re: SQL 101

    naa ba association sa d sql? kanang ang usa ka column sa usa ka table associated sa usa ka column sa laing table. naa? nya nsaon na cya?

  10. #20

    Default Re: SQL 101

    Red_Colt I like to answer your question but can you re-phrase it, I'm not really sure what you mean. Do you mean to check if the two tables have a relationship?

    Thanks.


  11.    Advertisement

Page 2 of 5 FirstFirst 1234 ... LastLast

Similar Threads

 
  1. Guitar 101
    By Carlo Borromeo in forum Music & Radio
    Replies: 74
    Last Post: 11-25-2014, 09:09 PM
  2. .:: Overclocking 101 ::.
    By FK in forum Computer Hardware
    Replies: 1043
    Last Post: 05-27-2008, 07:31 AM
  3. learning (my)sql 101 - B
    By anggwaponi in forum Programming
    Replies: 9
    Last Post: 03-14-2008, 05:56 AM
  4. learning (my)sql 101
    By anggwaponi in forum Programming
    Replies: 16
    Last Post: 02-29-2008, 01:12 PM
  5. SCAM 101 : never give out blank checks
    By SPRINGFIELD_XD_40 in forum Politics & Current Events
    Replies: 14
    Last Post: 06-06-2006, 12:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top