473,324 Members | 2,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Arguments are of the wrong type, are out of acceptable range, or are in conflict with

Hi Friend
My project is a Library System.
In Project is Book Master form. If I've select Book Type from Type Master and Publication from Publication Master then this error has come:

"Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. "

but if I've put amount manually and save the record then record has been successfully saved.

For selection of Book Type and Publication I've used Combo Box (CboBookType, CboPublication)

My code in project is as follows


This is for showing Publication (in Book Master) from Publication Master

Expand|Select|Wrap|Line Numbers
  1. Private Sub CboPublication_Click()
  2.   Set rsTemp = New ADODB.Recordset
  3.   With rsTemp
  4.     .CursorLocation = adUseClient
  5.     .CursorType = adOpenKeyset
  6.     .LockType = adLockOptimistic
  7.     .Open "Select * from tblPublicationmst where Publication = '" & CboPublication.Text & "'", Cn
  8.   End With
  9.  
  10.   With RS
  11.     If .RecordCount > 0 Then
  12.       CboPublication = !Publication
  13.       TxtQuantity.SetFocus
  14.     Else
  15.       MsgBox "Invalid Publication Name", vbInformation
  16.       CboPublication.Text = "" & Publication & ""
  17.       Exit Sub
  18.     End If
  19.     .Close
  20.   End With
  21. End Sub
This is for showing Book Type (in Book Master) from Type Master

Expand|Select|Wrap|Line Numbers
  1. Private Sub CboBookType_Click()
  2.   Set rsTemp = New ADODB.Recordset
  3.   rsTemp.Open "Select * FROM tblTypemst WHERE TypeName='" & CboBookType.Text & "'", Cn, adOpenKeyset, adLockOptimistic
  4.   With rsTemp
  5.     If .RecordCount > 0 Then
  6.       CboBookType.Text = !TypeName
  7.       TxtAouthor.SetFocus
  8.     Else
  9.       MsgBox "Invalid Book Type", vbInformation
  10.       CboBookType.Text = ""
  11.       Exit Sub
  12.     End If
  13.     .Close
  14.   End With
  15. End Sub
Please Friend Help .
It's urgent.

Regards
Neel
Dec 30 '07 #1
12 12254
creative1
274 100+
Try to see what in your selected value using message like this before

Expand|Select|Wrap|Line Numbers
  1. msgbox CboBookType.Text 
before
Expand|Select|Wrap|Line Numbers
  1. rsTemp.Open "Select * FROM tblTypemst WHERE TypeName='" & CboBookType.Text & "'", Cn, adOpenKeyset, adLockOptimistic
It will give you idea whats you are passing in the variable.
Dec 30 '07 #2
Killer42
8,435 Expert 8TB
Three questions...
  1. What version of VB are you using? (From the code, it looks like VB6)
  2. What line produces the error?
  3. Assuming it's one of the ones that executes an SQL query, what exact value is being substituted in there to look for? You can interrupt the code at that point (or just wait for the error to occur) then use VB's built-in debugging tools to examine or change variables and properties.
Dec 31 '07 #3
Three questions...
  1. What version of VB are you using? (From the code, it looks like VB6)
  2. What line produces the error?
  3. Assuming it's one of the ones that executes an SQL query, what exact value is being substituted in there to look for? You can interrupt the code at that point (or just wait for the error to occur) then use VB's built-in debugging tools to examine or change variables and properties.
I'm using Vb 6.0 & Error has come on line No. - 7 & 3
Jan 2 '08 #4
QVeen72
1,445 Expert 1GB
Hi,

Is the Connection Object (Cn) Open...?
Where have you Declared rsTemp?
Check what is selected in the ComboBox..?
Does your Queries work @ backend...?

REgards
Veena
Jan 2 '08 #5
creative1
274 100+
have you defined rsTemp ?
What is data type of publication in database?
Jan 2 '08 #6
creative1
274 100+
what a coincident? Veena and I asked alomost same questions? matter of time.
Jan 2 '08 #7
have you defined rsTemp ?
What is data type of publication in database?
Hi
I've declare rsTemp in Module
Publications is Text data type in Publicationmst
BookType is Text Data type in Bookmst
Query is not work @ backend
error has come on query line.
Jan 2 '08 #8
creative1
274 100+
Have you tried looking what you have in your queries?
Please once try this by storing value of your query in a string and then see what you have in it before you open recordset.
Jan 2 '08 #9
QVeen72
1,445 Expert 1GB
In your first post :

Open "Select * from tblPublicationmst where Publication = '" & CboPublication.Text & "'", Cn
In this post you say...
Publications is Text data type in Publicationmst
so check the Table name :tblPublicationmst Or Publicationmst
also field name : Publication Or Publications

also you say :
Query is not work @ backend
How do you expect to work from VB6...?

REgards
Veena
Jan 2 '08 #10
Killer42
8,435 Expert 8TB
... How do you expect to work from VB6...?
I suspect this merely reflects confusion over what you meant by "work at backend".
Jan 3 '08 #11
QVeen72
1,445 Expert 1GB
Hi,

By "BackEnd" , I meant, in Backend-Database..
I was not sure of what database he was using..


Regards
Veena
Jan 4 '08 #12
Hi,

By "BackEnd" , I meant, in Backend-Database..
I was not sure of what database he was using..


Regards
Veena
I Mean yar I'm using MS Access as a Database
( Laibrary.mdb ) is my database file

table name is - tblPublicationmst &
field name is - Publication
Jan 8 '08 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Tim Gaunt | last post by:
Hi, I'm hoping that someone will be able to help me with this one, I'm developing an application which basically inserts a load of data into the database ready for validation at a later date, I...
15
by: Erica | last post by:
I'm getting the following error: ADODB.Recordset error '800a0bb9' Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. /shop/results.asp, line...
1
by: Jack | last post by:
Hi, I am trying to add a new record to a main page. This page is the processing page to a form. However, I am getting the following error message: Error Type: ADODB.Recordset (0x800A0BB9)...
8
by: the other john | last post by:
Here's my project info first... DB: Access 2000 server: IIS 2003 Here is the error I'm getting... ADODB.Recordset error '800a0bb9' Arguments are of the wrong type, are out of acceptable...
0
by: Edward | last post by:
I have a wrapper function for executing a SQL Server Stored Procedure that returns no records: Public Function modRunStoredProc(vstrSPName As String, ParamArray vvarParams() As Variant) As...
1
by: iam247 | last post by:
Hi I have a web page which receives information from a form (using request.form) and also attempts to look at an Access query to read in recoeds to a variable named rsGroup. When I have the...
1
by: thecubemonkey | last post by:
Hi everyone, I'm getting the following error: ADODB.Recordset error '800a0bb9' Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another....
6
by: gforgourav | last post by:
'Arguments are of wrong type, are out of acceptable range, or are in conflict with one another' this error occurs ... i m using vb.net 2005 with sql server 2000 backend i had a project in vb 6.0...
3
by: Raluk | last post by:
Hello, Please help me. I'm trying to call a sql procedure for each record in a recordset. I'm getting this error :Arguments are of the wrong type, are out of acceptable range, or are in conflict...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.