Urgent! - Script to record SS in Pocket Access

Take a script, leave a script - Like the penny tray only different

Urgent! - Script to record SS in Pocket Access

Postby Shikha » Wed Jul 14, 2004 11:11 pm

Hi,

I need to develop a script to automatically record signal strength information into a Pocket Access table on my iPaq.

I created a table using the following SQL command :


sqlcmd = "CREATE TABLE siteSurvey (position int, MAC1_signal Integer, MAC1_noise int)"

As you can see, the MAC1_signal column is of type Integer and MAC1_noise is of type int. Now, I'm trying to insert a row into this table through the following script..

Sub OnScanResult(SSID, BSSID, CapFlags, Signal, Noise, LastSeen)

rs.Open "INSERT into siteSurvey (position, MAC1_signal, MAC1_noise) VALUES (1,Signal,Noise)"

End Sub


But for both fields I get the error, "A literal value in the command could not be converted to the correct type due to a reason other than data overflow SCode : 80040E07"

I understand the Signal and Noise fields in the OnScanResult Sub are integer values. What could the reason for the error be?

Is there a better way to populate the table with Signal strength info?

Thanks,
Shikha
Shikha
Mini Stumbler
 
Posts: 2
Joined: Thu Jun 17, 2004 7:41 pm

Postby goldfndr » Thu Sep 02, 2004 7:39 pm

Shikha wrote:Sub OnScanResult(SSID, BSSID, CapFlags, Signal, Noise, LastSeen)

rs.Open "INSERT into siteSurvey (position, MAC1_signal, MAC1_noise) VALUES (1,Signal,Noise)"

End Sub
Assuming you pasted your code into this message exactly, the problem is that you're passing string literals instead of the passed parameters.

Try this (obviously untested) instead:
rs.Open "INSERT into siteSurvey (position, MAC1_signal, MAC1_noise) VALUES (1," & Signal & "," & Noise & ")"
goldfndr
 
Posts: 181
Joined: Sat Aug 28, 2004 3:30 am
Location: Bellevue, WA, USA


Return to Scripts

Who is online

Users browsing this forum: No registered users and 1 guest