Click here to Skip to main content
15,899,313 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: how to send and read data through serial port using visual studio 2005? Pin
Luc Pattyn17-Dec-08 8:57
sitebuilderLuc Pattyn17-Dec-08 8:57 
QuestionOOOOOOOPS!!!!! Pin
kshincsk17-Dec-08 7:58
kshincsk17-Dec-08 7:58 
GeneralRe: OOOOOOOPS!!!!! Pin
Luc Pattyn17-Dec-08 9:00
sitebuilderLuc Pattyn17-Dec-08 9:00 
QuestionMulti User Application with Access database Pin
kshincsk17-Dec-08 7:56
kshincsk17-Dec-08 7:56 
AnswerRe: Multi User Application with Access database Pin
Dave Kreskowiak18-Dec-08 2:10
mveDave Kreskowiak18-Dec-08 2:10 
GeneralRe: Multi User Application with Access database Pin
kshincsk19-Dec-08 4:10
kshincsk19-Dec-08 4:10 
GeneralRe: Multi User Application with Access database Pin
Dave Kreskowiak19-Dec-08 12:08
mveDave Kreskowiak19-Dec-08 12:08 
GeneralRe: Multi User Application with Access database Pin
kshincsk22-Dec-08 1:05
kshincsk22-Dec-08 1:05 
Hi Dave,

Thanks a lot for the advice. I just created a record off the fly and used it to retrieve the ID with minimum value and "Flag=N" meaning it has ot been used for ay update. Then , I insert the data based on the text fields in my form. then I change the "Flag" field to 'Y' to say that this particular record has been used and use the followind method. Then I used the "idreturn" method to return the lowest value of ID with Flag=N. Worked like a charm!!! Absolutely no multi-user conflicts since each user would be opening a different record at the same time.

<br />
Dim strsql<br />
Dim conn As New ADODB.Connection<br />
Dim rs As New ADODB.Recordset<br />
           strsql = "SELECT * "<br />
    strsql = strsql & "FROM main "<br />
    strsql = strsql & "WHERE Flag ='N' AND ID=" & temp<br />
       <br />
      With conn 'this reliably opens a connection<br />
         .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=\\10.192.16.21\global\uktech\db\uktech.mdb"<br />
          .Open<br />
          <br />
    End With<br />
   <br />
   With rs<br />
        <br />
        .Open strsql, conn, adOpenStatic, adLockOptimistic<br />
       <br />
        <br />
    End With<br />
'Insert code here to update the Recordset with the txt box values<br />
.<br />
.<br />
.<br />
.<br />
.<br />
.<br />
.<br />
rs.update<br />
set rs= nothing<br />
End Sub<br />
<br />
.<br />
.<br />
.<br />
<br />
Public Sub idReturn()<br />
    <br />
    Dim CONNECT_STRING As String<br />
<br />
    CONNECT_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=\\10.192.16.21\global\uktech\db\uktech.mdb"<br />
                <br />
    Dim rs As Recordset<br />
<br />
    Set rs = New Recordset<br />
        <br />
    'Generate a SQL<br />
    Dim strsql As String<br />
<br />
    strsql = "select MIN(ID) from main WHERE Flag='N'"<br />
<br />
    With rs<br />
        .Open strsql, CONNECT_STRING<br />
            <br />
    End With<br />
<br />
    temp = rs(0)<br />
    id.Text = temp<br />
    rs.Requery<br />
    rs.Close<br />
    Set rs = Nothing<br />
      <br />
End Sub




I got promoted to System Analyst on Friday a couple of hours after I showed my manager this program. This makes it the 7th app I have developed since I joined work October last year.
Thanks for your support.

Best regards,
Kumar
GeneralRe: Multi User Application with Access database Pin
Dave Kreskowiak22-Dec-08 2:12
mveDave Kreskowiak22-Dec-08 2:12 
Question[Message Deleted] Pin
MS Lee17-Dec-08 4:22
MS Lee17-Dec-08 4:22 
AnswerRe: is it possible to import a dll file which was developed my vb.net in to a asp.net application? Pin
Tom Deketelaere17-Dec-08 4:52
professionalTom Deketelaere17-Dec-08 4:52 
GeneralRe: is it possible to import a dll file which was developed my vb.net in to a asp.net application? Pin
Jon_Boy17-Dec-08 6:09
Jon_Boy17-Dec-08 6:09 
AnswerRe: is it possible to import a dll file which was developed my vb.net in to a asp.net application? Pin
Paul Conrad17-Dec-08 5:44
professionalPaul Conrad17-Dec-08 5:44 
QuestionMkdir function Pin
dennymw17-Dec-08 0:18
dennymw17-Dec-08 0:18 
AnswerRe: Mkdir function Pin
Simon P Stevens17-Dec-08 0:43
Simon P Stevens17-Dec-08 0:43 
GeneralRe: Mkdir function Pin
dennymw17-Dec-08 2:09
dennymw17-Dec-08 2:09 
Question2D closet Designer Pin
willy200516-Dec-08 23:28
willy200516-Dec-08 23:28 
QuestionDebugger problem "The breakpoint will not currently be hit. No symbols have been loaded for this document Pin
~Khatri Mitesh~16-Dec-08 21:47
~Khatri Mitesh~16-Dec-08 21:47 
AnswerRe: Debugger problem "The breakpoint will not currently be hit. No symbols have been loaded for this document Pin
Simon P Stevens16-Dec-08 22:44
Simon P Stevens16-Dec-08 22:44 
GeneralRe: Debugger problem "The breakpoint will not currently be hit. No symbols have been loaded for this document Pin
astanton197817-Dec-08 3:34
astanton197817-Dec-08 3:34 
GeneralRe: Debugger problem "The breakpoint will not currently be hit. No symbols have been loaded for this document Pin
Jon_Boy17-Dec-08 4:13
Jon_Boy17-Dec-08 4:13 
GeneralRe: Debugger problem "The breakpoint will not currently be hit. No symbols have been loaded for this document Pin
astanton197817-Dec-08 4:15
astanton197817-Dec-08 4:15 
AnswerRe: Debugger problem "The breakpoint will not currently be hit. No symbols have been loaded for this document Pin
~Khatri Mitesh~25-Dec-08 19:29
~Khatri Mitesh~25-Dec-08 19:29 
QuestionHELP!!! How to make a movenext command? Pin
meki_211816-Dec-08 18:08
meki_211816-Dec-08 18:08 
AnswerRe: HELP!!! How to make a movenext command? Pin
Christian Graus16-Dec-08 18:15
protectorChristian Graus16-Dec-08 18:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.