Danmark vil mindske afhængigheden af globale techgiganter, men det kræver mere end politiske formuleringer og strategier, understreger PROSA’s formand Niels Bertelsen.
[kode] Dim strDatabaseName As String Dim strDBCursorType As String Dim strDBLockType As String Dim strDBOptions As String
Private Sub Command1_Click() On Error GoTo Command1_Click_Error Dim b As Long 'ikke nødvendig for funktion 'strDBCursorType = adOpenDynamic 'CursorType 'strDBLockType = adLockOptimistic 'LockType 'strDBOptions = adCmdText 'Options
Set cn = CreateObject("ADODB.Connection") Me.MousePointer = 11
cn.Open ConnectString()
With cn .CommandTimeout = 0 '.CursorLocation = adUseClient 'anner ike hvad gjor godt for udkommenteret, virker End With
Set Rs = CreateObject("ADODB.RecordSet") 'Creates record set
strSQL = "SELECT * FROM type ORDER BY id ASC" 'min sql streng
'rs.Open strSQL, cn, strDBCursorType, strDBLockType, strDBOptions 'data der ikek var nødvendig frasorterede Rs.Open strSQL, cn
If Rs.EOF Then GoTo ExitSub Else Do '<do whatever you need to do with the data here> List1.AddItem Rs("typenavn") Rs.MoveNext Loop While Not Rs.EOF End If
ExitSub:
Rs.Close Set Rs = Nothing cn.Close Set cn = Nothing
On Error GoTo 0 Exit Sub
Command1_Click_Error: MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure Command1_Click of Form " & Me.Name End Sub
Private Function ConnectString() As String Dim strServerName As String Dim strDatabaseName As String Dim strUserName As String Dim strPassword As String
'Change to IP Address if not on local machine 'Make sure that you give permission to log into the 'server from this address 'See Adding New User Accounts to MySQL 'Make sure that you d/l and install the MySQL Connector/ODBC 3.51 Driver
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.