Search Results

Search found 4 results on 1 pages for 'strc'.

Page 1/1 | 1 

  • vb.net : is it possible to connect to sql server 2008 via odbc but not through vb.net code?

    - by phill
    I'm supporting an old vb.net program whose database it connected to was moved from SQL Server 2005 to SQL Server 2008. Is there a setting on SQL Server 2008 which will allow ODBC connections to access the database but not allow VB.NET to connect to it programmatically? the error i keep receiving in the app is: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) however I can connect to it when I create a system dsn to the sql server instance and through VS2005's Tools Connect to Database. Here is the code I'm using to connect: dim strC as string strC = "data source=bob; database=subscribers; user id=bobuser; password=passme" dim connection as New SqlClient.SqlConnection(strC) try connection.open() catch ex as Exception msgbox(ex.message) end try connection.Close()

    Read the article

  • pointer-to-pointer of derived class in multiple inheritance

    - by Abdul jalil
    i have 3 classes A,B and C. C is derived from A and B. i get pointer to pointer of class C and cast to A** , and B ** , the variable that hold the the B** has the address of A** in my example B ** BdoublePtr hold the address of A** .i am using the following code #include "conio.h" #include "stdio.h" #include "string.h" class A{ public: A() { strA=new char[30]; strcpy(strA,"class A"); } char *strA; }; class B { public: B() { strB=new char[30]; strcpy(strB,"class B"); } char *strB; }; class C :public A, public B { public: C() { strC=new char[30]; strcpy(strC,"class C"); } char *strC; }; int main(void) { C* ptrC=new C(); A * Aptr=(A*)ptrC; printf("\n class A value : %s",Aptr-strA); B * Bptr=(B*)ptrC; printf("\n class B value :%s",Bptr-strB); printf("\n\nnow with double pointer "); A ** AdoublePtr=(A **)&ptrC; Aptr=AdoublePtr; printf("\n class A value : %s",Aptr-strA); B * BdoublePtr=(B **)&ptrC; Bptr=*BdoublePtr; printf("\n class B value : %s",Bptr-strB); getch(); return 0; }

    Read the article

  • MySQL: Insert into multiple tables in same query with BEGIN&COMMIT

    - by strc
    I want to insert into multiple tables in same query by using BEGIN and COMMIT. It seems the error occur at begin. here is my SQL command BEGIN INSERT INTO Product (pName, pBrand, pCategory, pSize, pQuantity, pPrice, pDetail) VALUES('$name', '$brand', '$category', '$size', '$quantity', '$price', '$detail') INSERT INTO Image (iName, iExt, iSize, pID) VALUES('$img_name', '$img_ext', '$img_size', LAST_INSERT_ID()); COMMIT;

    Read the article

  • asp.net regex help

    - by dominic
    Hi ive got this regular expression and that extracts numbers from a string string.Join(null,System.Text.RegularExpressions.Regex.Split(expr, "[^\\d]")); so eg, the format of my string is like this strA:12, strB:14, strC:15 so the regex returns 121415 how can I modify the expression to return 12,14,15 instead, any suggestions please

    Read the article

1