473,378 Members | 1,134 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,378 software developers and data experts.

How do I pass a variable from VBA to a query?

Seth Schrock
2,965 Expert 2GB
I'm new to defining a query in VBA (this is the first time) and I'm getting an error message: Too few parameters. Expected 5. Here is the code that I'm using:
Expand|Select|Wrap|Line Numbers
  1. Dim dbBilling As DAO.Database
  2.     Dim rstInvoices As DAO.Recordset
  3.     Dim lngInvoiceID As Long
  4.  
  5.     Set dbBilling = CurrentDb
  6.     Set rstInvoices = dbBilling.OpenRecordset("tblInvoices")
  7.  
  8.     rstInvoices.AddNew
  9.     rstInvoices("CustomerID").Value = Forms!frmCustomer!CustomerID
  10.     rstInvoices("BeginDate").Value = Forms!frmCustomer!txtStartDate
  11.     lngInvoiceID = rstInvoices!InvoiceID
  12.     rstInvoices.Update
  13.  
  14.     DoCmd.SetWarnings False
  15.     CurrentDb.Execute "UPDATE tblFileTypes " & _
  16.     "INNER JOIN tblACHFiles ON tblFileTypes.FileTypeID = tblACHFiles.CompanyFileID " & _
  17.     "SET tblACHFiles.InvoiceID = lngInvoiceID " & _
  18.     "WHERE (((tblACHFiles.ACHCompanyID)=[Forms]![frmCustomer]![CustomerID]) " & _
  19.     "AND ((tblACHFiles.EffectiveDate)>=[Forms]![frmCustomer]![txtStartDate] " & _
  20.     "AND (tblACHFiles.EffectiveDate)<=[Forms]![frmCustomer]![txtEndDate]) " & _
  21.     "AND ((tblFileTypes.BillingNumber)=[Forms]![frmCustomer]![cmbBillingNumber]))"
  22.     DoCmd.SetWarnings True
In researching the error message I found that this is a common error message when a field is misspelled. Since I copied almost all of the code from a working query, I'm thinking that the problem is in line 17 where I'm trying to pass the variable lngInvoiceID to the query. I'm thinking that since the query doesn't work by itself, it is causing the error.

Is it possible to set the value of tblACHFiles.InvoiceID to the variable lngInvoiceID?
Jan 11 '12 #1

✓ answered by NeoPa

There appears to be quite a lot of confusion still. Some of the things I'm sending out are just not landing for some reason. This is not something to worry about. I find when people get confused and know it, they just end up getting more confused. The only way to move on is somehow to relax so understanding doesn't matter. I'll try to help with that now, and maybe later you can revisit the thread and when you read it then everything I've said earlier will start to make much more sense.

For now though, I'll work with what I have and we'll see if we can't get beyond this (Which in turn will allow 'later' to occur earlier, when you can look back over the thread and have a better chance of seeing it from a less harrassed perspective). First things first. Good spot on catching the lngInvoiceID gotcha. Your fix also was perfect. Now, it seems clear that the four errors are the references to the controls on your [frmCustomer] form. The first, and most obvious, thing to check is that the form is actually open with valid values in the four controls when you test your query. I'm guessing (for want of clear info on the matter) that when your tests worked the form was open, but whenever you tested it and it failed, the form wasn't - hence the references to those controls failed (in which case Jet SQL would treat them as parameters without values). Test this hypothesis first.

Failing that we can convert the code which creates the SQL to use literal values within the SQL string (Just as you did for lngInvoiceID in fact). The code would then look something like :
Expand|Select|Wrap|Line Numbers
  1.     Dim frmMe As Form
  2.  
  3.     With Me
  4.         ...
  5.         Set frmMe = Forms("frmCustomer")
  6.         strSQL = "UPDATE [tblFileTypes]" & _
  7.                  "       INNER JOIN" & _
  8.                  "       [tblACHFiles]" & _
  9.                  "    ON tblFileTypes.FileTypeID = tblACHFiles.CompanyFileID " & _
  10.                  "SET    tblACHFiles.InvoiceID = %I " & _
  11.                  "WHERE ((tblACHFiles.ACHCompanyID = %C)" & _
  12.                  "  AND  (tblACHFiles.EffectiveDate Between #%S# And #%E#)" & _
  13.                  "  AND  (tblFileTypes.BillingNumber = %B))"
  14.         strSQL = Replace(strSQL, "%I", rstInvoices!InvoiceID)
  15.         strSQL = Replace(strSQL, "%C", frmMe.CustomerID)
  16.         strSQL = Replace(strSQL, "%S", Format(frmMe.txtStartDate, "m\/d\/yyyy"))
  17.         strSQL = Replace(strSQL, "%E", Format(frmMe.txtEndDate, "m\/d\/yyyy"))
  18.         strSQL = Replace(strSQL, "%B", frmMe.cmbBillingNumber)
  19.         Call dbBilling.Execute(strSQL)
  20.     End With
A number of assumptions had to be made due to lack of knowledge of exactly what you're doing where. I expect the code is running from within the module of frmCustomer. In which case frmMe is entirely unnecessary and the keyword Me can be used in its place (No preparation required as it already exists and is ready for use). I've also assumed [BillingNumber] is a numeric field. If it is textual then the relevant line (#13) needs changing to allow for the cmbBillingNumber value to be surrounded by quotes ('). I've also assumed that all the relevant controls can be guaranteed to contain valid data when this code is run.

If it's imperative that the previous approach is required - IE. references to the form controls - then I would still need the values posted of the four controls referenced as well as the value of lngInvoiceID at the point immediately prior to attempted execution of the query. In case it helps I will illustrate what you need to post by doing the same for the SQL I just created on the following assumptions (I won't need to include these values separately in the post as the posted SQL will tell me). I will also add white-space characters wherever it enhances the display, but only at points in the string where there is already white-space characters. This is OK as part of the standards of SQL is that white-space characters separate items but the length of the white-space is immaterial.

So, assuming these values :
Expand|Select|Wrap|Line Numbers
  1. lngInvoiceID      32,719
  2. txtCustomerID     662,816
  3. txtStartDate      13 Jan 2011
  4. txtEndDate        7 Feb 2011
  5. cmbBillingNumber  329
The SQL string would be :
Expand|Select|Wrap|Line Numbers
  1. UPDATE [tblFileTypes]
  2.        INNER JOIN
  3.        [tblACHFiles]
  4.     ON tblFileTypes.FileTypeID = tblACHFiles.CompanyFileID
  5. SET    tblACHFiles.InvoiceID = 32719
  6. WHERE ((tblACHFiles.ACHCompanyID = 662816)
  7.   AND  (tblACHFiles.EffectiveDate Between #1/13/2011# And #2/7/2011#)
  8.   AND  (tblFileTypes.BillingNumber = 329))
This appears to be good SQL, but this could prove very illuminating if one of the values had been Null for instance. The SQL string would immediately show a discrepancy which would be invisible when approached from the VBA angle.

PS. My code doesn't require the existence of the variable lngInvoiceID.

9 2312
NeoPa
32,556 Expert Mod 16PB
Seth, you need to check over When Posting (VBA or SQL) Code (again?).
Jan 11 '12 #2
Seth Schrock
2,965 Expert 2GB
Which part did I miss? I have option explicit set, it compiled just fine, I copied and pasted the code into the post and my code is within code tags.
Jan 11 '12 #3
NeoPa
32,556 Expert Mod 16PB
Lol :-D

Posting the actual SQL when debugging SQL code :-)

In reality, it also makes sense to include the values of any objects referenced such as controls on a form, as these can be different every time it's run. It's data we would need to allow us to interpret what we think might be going on and thereby identify what the problem might be.
Jan 12 '12 #4
Seth Schrock
2,965 Expert 2GB
Okay, I'm feeling really dense. I thought that the SQL was in lines 15-21. Other than that, I don't think that there is any other SQL happening in this procedure.

Referenced objects: ACHCompanyID is a number field and is the Foreign Key for the relationship between tblACHFiles and tblCustomer, EffectiveDate is a date value as is txtStartDate and txtEndDate, BillingNumber/cmbBillingNumber is just a number (usually 1), InvoiceID is an autonumber and the PK of tblInvoices. Previously, I had a query (code following) that used a DLookup() function to pull the InvoiceID in the SET portion of the query, but I ran into a problem when I had two records that matched all the criteria (that is why I've decided to do it this way.).
Expand|Select|Wrap|Line Numbers
  1. UPDATE tblFileTypes 
  2. INNER JOIN tblACHFiles ON tblFileTypes.FileTypeID = tblACHFiles.CompanyFileID 
  3. SET tblACHFiles.InvoiceID = DLookUp("InvoiceID","qryFindInvoiceID")
  4. WHERE (((tblACHFiles.ACHCompanyID)=[Forms]![frmCustomer]![CustomerID]) 
  5. AND ((tblACHFiles.EffectiveDate)>=[Forms]![frmCustomer]![txtStartDate] 
  6. AND (tblACHFiles.EffectiveDate)<=[Forms]![frmCustomer]![txtEndDate]) 
  7. AND ((tblFileTypes.BillingNumber)=[Forms]![frmCustomer]![cmbBillingNumber]))
  8.  
This query worked properly. I just had my logic wrong which produced the wrong results.
Jan 12 '12 #5
NeoPa
32,556 Expert Mod 16PB
I'm not sure I follow exactly what you do and don't understand, so I'll make a few statements and if they're things you already understand then ignore them.
  1. The SQL you just posted is the SQL required (sensibly formatted thank you). It is important though (critically important), that what you post is the exact result as produced by printing off the string created in your VBA. I notice this isn't the case here, so typically (not in this case as it's you and also the SQL itself is relatively straightforward), I would ignore it or treat it with much suspicion. Obviously, I don't want to waste my time looking carefully at a SQL string which may be the result of typos and exactly the misunderstandings that I would be there to try to discover. If the poster only posts what he expects to see then I have no way of knowing what's actually there. This is especially important if a misspelling may have occurred. If necessary assign the SQL to a string variable first and print it to the Immediate Pane before copying it and pasting it into a post. Simples (Russian accent of meerkat).
  2. The resultant SQL is often complicated by literals being prepared from values taken from other objects. Hence a clear picture is only available when the final resultant SQL is seen. Experienced coders can often see these anyway, but it's also a very good idea for people to do this as they learn to see things for themselves much more easily when the actual SQL is visible.
  3. The values of relevant objects I referred to earlier was about the control references (EG. [Forms]![frmCustomer]![cmbBillingNumber]) rather than field references in the SQL as such. These are often used in filters and understanding what happens is often heavily dependent on knowing these.
  4. Many SQL strings (not in this case) use objects such as these, and even others available to the VBA code, to include literal references in the SQL. These are literals in the SQL but objects in the VBA - hence we have little clue what they're doing unless we see the resolved SQL.
Seth:
This query worked properly. I just had my logic wrong which produced the wrong results.
So, does this mean all is resolved? Or is there still a problem?
Jan 12 '12 #6
Seth Schrock
2,965 Expert 2GB
My problem of passing a variable into the SQL isn't fixed. I also think that I understand your questions now. The code in post #5 was the query that I was running before that ran, but did not produce the results that I wanted. Therefore I'm trying to create the query in VBA so that I don't have to do the DLookup() in the SET value that is in my previous query. So, the query that I'm trying to run now is
Expand|Select|Wrap|Line Numbers
  1. UPDATE tblFileTypes INNER JOIN tblACHFiles ON tblFileTypes.FileTypeID = tblACHFiles.CompanyFileID 
  2. SET tblACHFiles.InvoiceID = lngInvoiceID 'variable to return a number such as 101
  3. WHERE (((tblACHFiles.ACHCompanyID)=[Forms]![frmCustomer]![CustomerID]) 
  4. AND ((tblACHFiles.EffectiveDate)>=[Forms]![frmCustomer]![txtStartDate] 
  5. AND (tblACHFiles.EffectiveDate)<=[Forms]![frmCustomer]![txtEndDate]) 
  6. AND ((tblFileTypes.BillingNumber)=[Forms]![frmCustomer]![cmbBillingNumber]))
The difference is in the SET line.

I did some troublshooting and got some interesting results. I assigned the query to a variable (strSQL) and then executed the variable. So I used the immediate window to find out what strSQL was doing. I then copied and pasted the result into a regular query and it ran fine. However, when I try to run the query in VBA via the
Expand|Select|Wrap|Line Numbers
  1. CurrentDb.Execute strSQL
command, the error message that I get now is Too few parameters. Expected 4. where before it expected 5. I did find one error that I had when trying to include the variable previously. Before I had the SET line be
Expand|Select|Wrap|Line Numbers
  1. "SET tblACHFiles.InvoiceID = lngInoviceID " & _
but I fixed it to be
Expand|Select|Wrap|Line Numbers
  1. "SET tblACHFiles.InvoiceID = " & lngInvoiceID & _
I think that this change is why the error message changed from expected 5 to expected 4.

So, I know that the query runs okay in a regular query. I just need to know why it isn't working in VBA.

Just for clarification, here is the code that I'm running now.
Expand|Select|Wrap|Line Numbers
  1.     Dim dbBilling As DAO.Database
  2.     Dim rstInvoices As DAO.Recordset
  3.     Dim lngInvoiceID As Long
  4.     Dim strSQL As String
  5.  
  6.     Set dbBilling = CurrentDb
  7.     Set rstInvoices = dbBilling.OpenRecordset("tblInvoices")
  8.  
  9.     rstInvoices.AddNew
  10.     rstInvoices("CustomerID").Value = Forms!frmCustomer!CustomerID
  11.     rstInvoices("BeginDate").Value = Forms!frmCustomer!txtStartDate
  12.     rstInvoices("EndDate").Value = Forms!frmCustomer!txtEndDate
  13.     rstInvoices("InvoiceTotal").Value = DSum("TotalCharge", "qrySpecialCountWIIF")
  14.     lngInvoiceID = rstInvoices!InvoiceID
  15.     rstInvoices.Update
  16.  
  17.  
  18.     strSQL = "UPDATE tblFileTypes " & _
  19.     "INNER JOIN tblACHFiles ON tblFileTypes.FileTypeID = tblACHFiles.CompanyFileID " & _
  20.     "SET tblACHFiles.InvoiceID = " & lngInvoiceID & _
  21.     " WHERE (((tblACHFiles.ACHCompanyID)=[Forms]![frmCustomer]![CustomerID]) " & _
  22.     "AND ((tblACHFiles.EffectiveDate)>=[Forms]![frmCustomer]![txtStartDate] " & _
  23.     "AND (tblACHFiles.EffectiveDate)<=[Forms]![frmCustomer]![txtEndDate]) " & _
  24.     "AND ((tblFileTypes.BillingNumber)=[Forms]![frmCustomer]![cmbBillingNumber]))"
  25.  
  26.  
  27.     DoCmd.SetWarnings False
  28.     CurrentDb.Execute strSQL
  29.     DoCmd.SetWarnings True
  30.  
I hope that I have provided enough information this time :) I'm a little confused trying to have both VBA and SQL in the same space, so I think that is why I'm confused with your questions.
Jan 12 '12 #7
NeoPa
32,556 Expert Mod 16PB
There appears to be quite a lot of confusion still. Some of the things I'm sending out are just not landing for some reason. This is not something to worry about. I find when people get confused and know it, they just end up getting more confused. The only way to move on is somehow to relax so understanding doesn't matter. I'll try to help with that now, and maybe later you can revisit the thread and when you read it then everything I've said earlier will start to make much more sense.

For now though, I'll work with what I have and we'll see if we can't get beyond this (Which in turn will allow 'later' to occur earlier, when you can look back over the thread and have a better chance of seeing it from a less harrassed perspective). First things first. Good spot on catching the lngInvoiceID gotcha. Your fix also was perfect. Now, it seems clear that the four errors are the references to the controls on your [frmCustomer] form. The first, and most obvious, thing to check is that the form is actually open with valid values in the four controls when you test your query. I'm guessing (for want of clear info on the matter) that when your tests worked the form was open, but whenever you tested it and it failed, the form wasn't - hence the references to those controls failed (in which case Jet SQL would treat them as parameters without values). Test this hypothesis first.

Failing that we can convert the code which creates the SQL to use literal values within the SQL string (Just as you did for lngInvoiceID in fact). The code would then look something like :
Expand|Select|Wrap|Line Numbers
  1.     Dim frmMe As Form
  2.  
  3.     With Me
  4.         ...
  5.         Set frmMe = Forms("frmCustomer")
  6.         strSQL = "UPDATE [tblFileTypes]" & _
  7.                  "       INNER JOIN" & _
  8.                  "       [tblACHFiles]" & _
  9.                  "    ON tblFileTypes.FileTypeID = tblACHFiles.CompanyFileID " & _
  10.                  "SET    tblACHFiles.InvoiceID = %I " & _
  11.                  "WHERE ((tblACHFiles.ACHCompanyID = %C)" & _
  12.                  "  AND  (tblACHFiles.EffectiveDate Between #%S# And #%E#)" & _
  13.                  "  AND  (tblFileTypes.BillingNumber = %B))"
  14.         strSQL = Replace(strSQL, "%I", rstInvoices!InvoiceID)
  15.         strSQL = Replace(strSQL, "%C", frmMe.CustomerID)
  16.         strSQL = Replace(strSQL, "%S", Format(frmMe.txtStartDate, "m\/d\/yyyy"))
  17.         strSQL = Replace(strSQL, "%E", Format(frmMe.txtEndDate, "m\/d\/yyyy"))
  18.         strSQL = Replace(strSQL, "%B", frmMe.cmbBillingNumber)
  19.         Call dbBilling.Execute(strSQL)
  20.     End With
A number of assumptions had to be made due to lack of knowledge of exactly what you're doing where. I expect the code is running from within the module of frmCustomer. In which case frmMe is entirely unnecessary and the keyword Me can be used in its place (No preparation required as it already exists and is ready for use). I've also assumed [BillingNumber] is a numeric field. If it is textual then the relevant line (#13) needs changing to allow for the cmbBillingNumber value to be surrounded by quotes ('). I've also assumed that all the relevant controls can be guaranteed to contain valid data when this code is run.

If it's imperative that the previous approach is required - IE. references to the form controls - then I would still need the values posted of the four controls referenced as well as the value of lngInvoiceID at the point immediately prior to attempted execution of the query. In case it helps I will illustrate what you need to post by doing the same for the SQL I just created on the following assumptions (I won't need to include these values separately in the post as the posted SQL will tell me). I will also add white-space characters wherever it enhances the display, but only at points in the string where there is already white-space characters. This is OK as part of the standards of SQL is that white-space characters separate items but the length of the white-space is immaterial.

So, assuming these values :
Expand|Select|Wrap|Line Numbers
  1. lngInvoiceID      32,719
  2. txtCustomerID     662,816
  3. txtStartDate      13 Jan 2011
  4. txtEndDate        7 Feb 2011
  5. cmbBillingNumber  329
The SQL string would be :
Expand|Select|Wrap|Line Numbers
  1. UPDATE [tblFileTypes]
  2.        INNER JOIN
  3.        [tblACHFiles]
  4.     ON tblFileTypes.FileTypeID = tblACHFiles.CompanyFileID
  5. SET    tblACHFiles.InvoiceID = 32719
  6. WHERE ((tblACHFiles.ACHCompanyID = 662816)
  7.   AND  (tblACHFiles.EffectiveDate Between #1/13/2011# And #2/7/2011#)
  8.   AND  (tblFileTypes.BillingNumber = 329))
This appears to be good SQL, but this could prove very illuminating if one of the values had been Null for instance. The SQL string would immediately show a discrepancy which would be invisible when approached from the VBA angle.

PS. My code doesn't require the existence of the variable lngInvoiceID.
Jan 12 '12 #8
Seth Schrock
2,965 Expert 2GB
Okay. The first set of code you provided worked (except you forgot to Replace "%C" which was an easy fix). The form was open (in fact the button that triggers this code is in the form so the code can't be triggered unless the form is open) so I did delete the frmMe parts and did just Me.{blank}.

Your assumed values were right on the money. Since you said that it was probably the references to the form in my code that was the problem, I tested the values in the Immediate window by copy/pasting from the code into the Immediate window and the correct values were coming back, but the query still wouldn't run. The values that I had coming back were
Expand|Select|Wrap|Line Numbers
  1. CustomerID    15
  2. txtStartDate        7/1/2011
  3. txtEndDate          12/31/2011
  4. cmbBillingNumber    1
Just for fun, I hard coded these values into the query and it worked. I'm still not sure why the references didn't work in the code since they worked in the Immediate window. However, since I know your code does work, I will stick with that.

Thanks so very much for your patience with me and I appologize for any stress that I have put you through.
Jan 12 '12 #9
NeoPa
32,556 Expert Mod 16PB
No apologies necessary from you Seth. You're in credit by plenty in my book. Keep on keeping on.

I'm afraid I don't understand either why your form control references were not accepted by Jet. I noticed that [CustomerID] was the only one without a prefix indicating the control type, but even if that were wrong it would only cause one invalid reference rather than four. No. I'm still in the dark on that one.

PS. I updated the earlier post to fix the omission you spotted. It was certainly there, but I felt the post would be more useful for reference if it made proper sense ;-)
Jan 12 '12 #10

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

Similar topics

3
by: Paradigm | last post by:
I want to create a pass through query in Access to get data from a MYSQL table. I need to do this using code so that sertain aspects of the query can be changed. When I look at the SQL version of...
3
by: dk | last post by:
Hi all, Would appreciate some advice on the following: I am trying to speed up an Access database connected to a SQL Server back-end. I know I can use a pass-through query to pass the sql...
6
by: Access Newbie | last post by:
I'm using Access 2000 and I'm trying to create a pass-through query to append all the data from a local table to a remote table. I'm using the SQL query editor in MS Access to create the query (I...
2
by: Robert | last post by:
when using the following function to create a pass through query is there a way to set the query property, "Returns Rows" to no. The default is yes. Since we are planning to create the pass...
3
by: Paradigm | last post by:
I want to create a pass through query in Access to get data from a MYSQL table. I need to do this using code so that certain aspects of the query can be changed. When I look at the SQL version of...
3
by: ILCSP | last post by:
Hello, I'm fairly new to the concept of running action pass through queries (insert, update, etc.) from Access 2000. I have a SQL Server 2000 database and I'm using a Access 2K database as my...
1
by: Greg Strong | last post by:
Hello All, Why would brackets be added to the SQL of a pass through query to Oracle? If I paste the debug print of the SQL statement into SQLPlus of Oracle's XE edition it works, and does NOT...
2
by: Bob Alston | last post by:
If you have an access form with record source being a straightforward query and where clause in the form definition, will the query be sent to the back end jet/Access database and executed there,...
16
by: pabs1111 | last post by:
I'm trying to filter the records in a form using a pass through query. strFilter = strFilter & "( eventid in (select FWIPEvent.eventid from FWIPEvent )) " Me.Filter = strFilter Me.FilterOn =...
2
by: peachdot | last post by:
hi, The MainForm will have 2 buttons: 1.) Button A : User click button A, hide Mainform then go to form1. User enter data in the textbox.Click finish button,form1 close then go back to...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.