Connection vb.net avec access

cyberfinger01 Messages postés 33 Date d'inscription vendredi 14 janvier 2005 Statut Membre Dernière intervention 25 février 2010 - 18 mai 2009 à 14:15
PROTEUS91 Messages postés 156 Date d'inscription mardi 4 novembre 2003 Statut Membre Dernière intervention 28 décembre 2010 - 18 mai 2009 à 23:27
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="ProgId" content="Word.Document" />
<meta name="Generator" content="Microsoft Word 11" />
<meta name="Originator" content="Microsoft Word 11" />
<link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml" />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Tableau Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->

Bonjour tout le
monde,

Voila, Je voudrais créer un dataset qui retourne des lignes dans une table
d'une base de données ACCESS. Mais la requête comporte un paramètre. Quand j'exécute
le paramètre, ça me dit qu'un paramètre n'a pas été saisi. Alors qu'en SQL
SERVER cela s'exécute sans problème. Si quelqu'un a une idée sur ce problème,
faites le moi savoir SVP.

1 réponse

PROTEUS91 Messages postés 156 Date d'inscription mardi 4 novembre 2003 Statut Membre Dernière intervention 28 décembre 2010
18 mai 2009 à 23:27
... Je comprends pas bien, pourquoi on pose des questions sans les fameux parametres !

Je veux bien t'aider. Mais tu n'auras pas de reponse si tu ne donne pas :
1. Le controle que tu utilise pour interroger ta base de données
2. La ligne de code qui appel la base de données.
3. La ligne de code qui appel la table.

Du coup je te donne un bout de code que j'utilise pour interroger une base de données avec un control ADODC, mais si ca ne te convient reponds moi avec plus de parametres stp.

Public Sub PROCEDURE_MAJDAT(Adodc_Control As Adodc, Str_DataPath As String, Str_DataFileName As String, Str_DataSQLRequest As String)
With Adodc_Control
    .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Str_DataPath & "" & Str_DataFileName & ";Persist Security Info=False"
    .RecordSource = Str_DataSQLRequest
    .CommandType = adCmdText
    .Refresh
End With

End Sub

PROTEUS
0
Rejoignez-nous