msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Error using a "Select" statement

 
Post new topic   Reply to topic    msvisual.com Forum Index -> DirectX
Author Message
Sam



Joined: 04 Oct 2007
Posts: 8

PostPosted: Sat May 26, 2007 9:35 am    Post subject: Error using a "Select" statement Reply with quote

The code below is an extract from a application I am trying to write.
[code]Dim MyConn As ADODB.Connection
Dim MyRecSet As ADODB.Recordset
Set MyConn = New ADODB.Connection
MyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source =
D:\Data\Orion-Testing\TestServer\Inventory.mdb"
MyConn.Open

Set MyRecSet = MyConn.Execute("Select * from GenericToAlt where dbAltPN = '"
& cboAltPart.Text & "'")
If MyRecSet.RecordCount = 0 Then
Stop
End If[/code]
I am getting the error: [B]"No value given for one or more required
parameters."[/B]. It is happening on the "Set MyRecSet ..." statement.
As I step through the code, cboAltPart.Text does contain the correct value.
Here is the layout of the Table:
TableName: GenericToAlt
dbAtlPN text 30
dbAltPO text 10

There are NO primary or secondary indexes.

I don't see the problem, Can You help?
--
Thank You,
Sam

Archived from group: microsoft>public>vb>directx
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> DirectX All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group