Re: VB Scripting and XP Embedded

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: KM (konstmor_at_nospam_yahoo.com)
Date: 10/18/04


Date: Mon, 18 Oct 2004 16:18:07 -0700

nonsbr,

Comments inline...

Before going to the XPe troubleshooting route (FileMon/Regmon/DependencyWalker/etc.) it may make sense to check out what's in your
image and how the script works on XP Pro.

-- 
 Regards,
        KM, BSquare Corp.
> Hi!
....
>
> First, we are using an OEM image of XP embedded (slightly customized)
> that we are running on HP t5700 thin client devices.
>
> What we are trying to do is connect to an sql database using a vb
> script that contains a simple con.open connection string. No matter
> how we have varied the script, it still fails. Conversely, when
> creating a DSN entry to the database, we are able to connect.
This way most likely you tested ODBC driver (SQL Server) only.
> This leads us to believe that the issue is with the script and not the
> workstations ability to connect in the first place.
Not true. That may also mean you've got problems with OLE DB provider (SQL Server).
Do you have "Microsoft Data Access Components (MDAC)" (better Hotfix Q824704) component in your image?
> So I guess the question is has anyone had any experience with doing
> sql queries from XPE? Here is an example of the code we are using:
>
>
> Set con = CreateObject("ADODB.Connection")
> Con.Open ("Driver={SQL Server};Server=x.x.x.51;Uid=userid;Pwd=pword")
Using ADO will assume you need proper OLE DB provider (driver).
Btw, you can also try to use the created DSN here (add DSN=... in the connection string, or FILEDSN=... if you want to use saved DSN
file) if you know it worked for you.
> Seems pretty straight forward, but every time we run it, we get the
> very helpful "80004005 unspecified error" message. We have tried with
> dsn and dsn-less connection attempts.
What line of the VB code errors out? The .Connect call or else?
If else, there may also be ADO marshaling some certain data types issue (adVariant). But then you need to debug the script on XP Pro
machine first (have you do that, btw?).
KM


Relevant Pages

  • Re: Error 15401 using sp_grantlogin (not addressed by current KB articles)
    ... Restarting Windows 2000 resolved the problem for this particular account, ... confused when it sees a duplicate SID. ... > One way to get SQL Server to agree with the renamed NT ... > Preview (to ensure the script was created), ...
    (microsoft.public.sqlserver.security)
  • Re: Add columns to table, but in an order
    ... in the order that SQL Server mentions them, with no way for the end user ... existing constraints and recreate them when the new table is in place. ... be very critical of the script ... Make sure to test the conversion on a test server first. ...
    (microsoft.public.sqlserver.server)
  • Re: SQL Security
    ... except I'm having problems making it work in a script. ... ;Set properties of DB objects and open connection to database ... > from Books Online (within the SQL Server program group): ... > communicate with SQL Server. ...
    (microsoft.public.sqlserver.server)
  • Re: Scripting a SQL database
    ... Virtually everything SQL Server Enterprise Manager does can be ... To run the generated script in ASP, ... You can also create a DTS (Data Transformation Package) ... that you'll want to select the "copy database objects and data" ...
    (microsoft.public.sqlserver.server)
  • Re: Scripting a SQL database
    ... Virtually everything SQL Server Enterprise Manager does can be ... To run the generated script in ASP, ... You can also create a DTS (Data Transformation Package) ... that you'll want to select the "copy database objects and data" ...
    (microsoft.public.inetserver.asp.db)