Brad
03-06-2003, 09:26 AM
Good morning,
Could someone take a look at this, please ?
This follows on from a previous help I received, which helped me to select certain elements from a text file. I have a user and password list, which is just a text file, with lots of paragraphs like this:
Firstname_Secondname Password="whatever"
Service-Type=Framed,
Framed-protocol=PPP,
Ascend-Send-Auth = Send-Auth-None,
Ascend-Route-IP=Route-IP-Yes,
Ascend-Metric=1,
Ascend-Data-Svc = Switched-128K,
Framed-Routing=None,
Ascend-Idle-Limit = 1200,
Ascend-Assign-IP-Pool=3
I needed to retrieve the username and password only. I was kindly given this code to use, which worked perfectly:
SQLStr = "SELECT Left([Field1],InStr([Field1],' Password')-1) AS Username, Mid([Field1],InStr([Field1],Chr(34))+1,Len([Field1])-InStr([Field1],Chr(34))-1) AS Password FROM Users WHERE (((Users.Field1) Like '%" & delimiter & "%' & '" & pws & "%'));"
However, is it possible to create a piece of code which will read all the above lines above upto the next blnak line, then start again ???
Thanks, as always, in advance,
Brad.
Could someone take a look at this, please ?
This follows on from a previous help I received, which helped me to select certain elements from a text file. I have a user and password list, which is just a text file, with lots of paragraphs like this:
Firstname_Secondname Password="whatever"
Service-Type=Framed,
Framed-protocol=PPP,
Ascend-Send-Auth = Send-Auth-None,
Ascend-Route-IP=Route-IP-Yes,
Ascend-Metric=1,
Ascend-Data-Svc = Switched-128K,
Framed-Routing=None,
Ascend-Idle-Limit = 1200,
Ascend-Assign-IP-Pool=3
I needed to retrieve the username and password only. I was kindly given this code to use, which worked perfectly:
SQLStr = "SELECT Left([Field1],InStr([Field1],' Password')-1) AS Username, Mid([Field1],InStr([Field1],Chr(34))+1,Len([Field1])-InStr([Field1],Chr(34))-1) AS Password FROM Users WHERE (((Users.Field1) Like '%" & delimiter & "%' & '" & pws & "%'));"
However, is it possible to create a piece of code which will read all the above lines above upto the next blnak line, then start again ???
Thanks, as always, in advance,
Brad.