ERLEDIGT
NEIN
NEIN
ANTWORTEN
0
0
ZUGRIFFE
153
153
EMPFEHLEN
-
14.09.08 17:13 #1
- Registriert seit
- Feb 2005
- Ort
- Bad Dürkheim
- Beiträge
- 5
Hallo zusammen!
Ich habe eine Funktion erstellt für die Serververbindung und eine zweite Funktion für Dataadapter, Command und dataset.
Code :1 2 3 4 5 6 7 8 9 10 11
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Function[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] F_01([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] dataSet [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] DataSet, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] connectionString [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], _[/SIZE] [SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] query [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]) [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] DataSet[/SIZE] [SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] con [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] SqlClient.SqlConnection = GetConnection()[/SIZE] [SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] adapter [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] SqlClient.SqlDataAdapter()[/SIZE] [SIZE=2]query = [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"Select tbl_01 from Logi_01"[/COLOR][/SIZE] [/COLOR][/SIZE][SIZE=2]adapter.SelectCommand = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] SqlClient.SqlCommand(query, con)[/SIZE] [SIZE=2]adapter.Fill(dataSet)[/SIZE] [SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Return[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] dataSet[/SIZE] [SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Using[/COLOR][/SIZE] [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Function[/COLOR][/SIZE] [/COLOR][/SIZE]
Beim Aufruf kommt folgende Fehlermeldung:
Fehler 1 Für den Parameter "connectionString" von "Public Function F_01(dataSet As System.Data.DataSet, connectionString As String, query As String) As System.Data.DataSet" wurde kein Argument angegeben. C:\Dokumente und Einstellungen\Hurek.HUREK-7B83C703B\Eigene Dateien\Visual Studio 2005\Projects\Test_01\Test_01\Form1.vb 73 9 Test_01
Fehler 2 Für den Parameter "dataSet" von "Public Function F_01(dataSet As System.Data.DataSet, connectionString As String, query As String) As System.Data.DataSet" wurde kein Argument angegeben. C:\Dokumente und Einstellungen\Hurek.HUREK-7B83C703B\Eigene Dateien\Visual Studio 2005\Projects\Test_01\Test_01\Form1.vb 73 9 Test_01
Fehler 3 Für den Parameter "query" von "Public Function F_01(dataSet As System.Data.DataSet, connectionString As String, query As String) As System.Data.DataSet" wurde kein Argument angegeben. C:\Dokumente und Einstellungen\Hurek.HUREK-7B83C703B\Eigene Dateien\Visual Studio 2005\Projects\Test_01\Test_01\Form1.vb 73 9 Test_01
Was habe ich Trottel wieder falsch gemacht. Für Hilfe mit einen Stück Code wäre ich dankbar.
Gruß Peter
Ähnliche Themen
-
Probleme mit function()
Von thomsonz im Forum PHPAntworten: 2Letzter Beitrag: 13.03.08, 17:24 -
probleme mit function und sessionid
Von Binio im Forum Javascript & AjaxAntworten: 6Letzter Beitrag: 11.01.08, 21:45 -
Probleme mit einer Function
Von SantaCruze im Forum PHPAntworten: 1Letzter Beitrag: 04.03.07, 14:00 -
Probleme mit Function und Auslesen aus der DB
Von ctp im Forum PHPAntworten: 4Letzter Beitrag: 20.06.06, 21:30 -
Probleme mit function
Von webmaster76 im Forum Javascript & AjaxAntworten: 1Letzter Beitrag: 22.03.05, 11:51





Zitieren
Login





