hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Programming Tutorials : VBCScript
Reply

Programming Tutorials How-Tos related to programming, databases, and the like.
Forum Jump

VBCScript

Reply Post New Thread In Programming Tutorials Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 12-21-2005, 01:18 PM
Pete EFC Pete EFC is offline
Junior Guru Wannabe
 
Join Date: Feb 2004
Posts: 54

VBCScript


Could someone please tell me why this bit of code keeps giving me the error:

"Subscript out of range"

If CharCurrentVal = TextDelimiter Then
counter = + 1
tempArray(counter) = tempString
tempString = ""
Else
tempString = tempString & CharCurrentVal
End If

next

'if vType = "position" then

'-----------------------------------------------------------------------------------------------------------------------

Set dbConn= Server.CreateObject("ADODB.Connection")

' Modify the following line accordingly if you change the database file name
' or decide to use a DSN connection.

dbConn.Open "DBQ=" & Server.Mappath("aaa.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"

Set dbRecSet = Server.CreateObject("ADODB.Recordset")
dbRecSet.Open "Position_Probe",dbConn,2,3

dbRecSet.MoveFirst

'Loop through column

'For counter = 1 to NoItems
' Next
dbRecSet("item1") = tempArray(1)

I am trying to get a program to fill in fields on a database, one of the fields is headed "item1"

I think that the problem is within this part of the code.

Thanks

Reply With Quote


Sponsored Links
Reply

Related posts from TheWhir.com
Title Type Date Posted


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?